[DEV][HOWTO] Extracting stock firmware files from .tot files - LG Optimus G (International)

Hello everyone!
First off:
DISCLAIMER: I AM NOT RESPONSIBLE FOR ANYTHING YOU DO TO YOUR PHONE WHILE USING ANY OF THE INFORMATION LOCATED BELOW. IF YOU DO NOT UNDERSTAND WHAT IS BEING DONE, PLEASE DO NOT TRY ANYTHING DONE HERE!
This is still in a VERY basic phase. I am not sure how helpful it will be, but currently, I have been able to extract some of the smaller partitions from the AT&T firmware file.
Starting off, when LGNPST is used to image a phone, it creates a log file in C:\LG Electronics\LGNPST\Models\LOG\ For example, mine was called LS970Log_COM5.log. We are really only interested in one part of this file, located close to the bottom when the phone is actually being imaged. It should look something like this:
0Download mode locking
0Download : PrimaryGPT 0x 0 Size: 0x 512Kb, File Offset: 0x 100000
0 3.182994E-313mmc Init
0Partition Count : 35======================================================
0======================================================
0Download : modem 0x 800000 Size: 0x 54272Kb, File Offset: 0x 180000
0Download : sbl1 0x4800000 Size: 0x 512Kb, File Offset: 0x3680000
0Download : sbl2 0x4880000 Size: 0x 512Kb, File Offset: 0x3700000
0Download : sbl3 0x4900000 Size: 0x 1024Kb, File Offset: 0x3780000
0Download : aboot 0x4b00000 Size: 0x 512Kb, File Offset: 0x3880000
0Download : rpm 0x4b80000 Size: 0x 512Kb, File Offset: 0x3900000
0Download : boot 0x5000000 Size: 0x 7168Kb, File Offset: 0x3980000
0Download : tz 0x6800000 Size: 0x 512Kb, File Offset: 0x4080000
0(null)kip misc Partition
0Download : system 0xb000000 Size: 0x 131072Kb, File Offset: 0x4900000
0Download : system 0x13000000 Size: 0x 512Kb, File Offset: 0xc900000
0Download : system 0x1325e000 Size: 0x 129024Kb, File Offset: 0xc980000
0Download : system 0x1b1fd000 Size: 0x 129536Kb, File Offset: 0x14780000
0Download : system 0x2325e000 Size: 0x 129024Kb, File Offset: 0x1c600000
0Download : system 0x2b1fd000 Size: 0x 129536Kb, File Offset: 0x24400000
0Download : system 0x3325e000 Size: 0x 129024Kb, File Offset: 0x2c280000
0Download : system 0x3b1fd000 Size: 0x 129536Kb, File Offset: 0x34080000
0Download : system 0x4325e000 Size: 0x 129024Kb, File Offset: 0x3bf00000
0Download : system 0x4b1fd000 Size: 0x 76800Kb, File Offset: 0x43d00000
0Download : system 0x53000000 Size: 0x 512Kb, File Offset: 0x48800000
0Download : system 0x5b000000 Size: 0x 512Kb, File Offset: 0x48880000
0Download : system 0x63000000 Size: 0x 512Kb, File Offset: 0x48900000
0Download : persist 0x7a800000 Size: 0x 4608Kb, File Offset: 0x48980000
0Download : recovery 0x8b000000 Size: 0x 8192Kb, File Offset: 0x48e00000
0Download : BackupGPT 0xab380000 Size: 0x 512Kb, File Offset: 0x49600000
0
*********************************************************************************************
Click to expand...
Click to collapse
What do we see that is important here? Image sizes and offsets for data in the file! For example, lets take the boot partition.
0Download : boot 0x5000000 Size: 0x 7168Kb, File Offset: 0x3980000
Click to expand...
Click to collapse
We have a offset of 0x3980000 and a size of 7168Kb. That converts to an equivalent of an offset of 60293120 bytes and a size of 7340032 bytes (I really hope I got that right. As I'm sitting here writing this, I'm thinking of how many different ways I could have messed up that calculation...)
Here, I am using dd on linux in order to separate the partitions from the binary file, but it can be done using equivalent tools on windows.
$ dd bs=1 skip=60293120 count=7340032 if=LGE970AT-00-V10o-ATT-US-SEP-29-2012+0.tot of=boot.img
Click to expand...
Click to collapse
Basically, what I am doing here is copying 7340032 bytes, starting at byte 60293120, from the .tot file to boot.img.
Now, lets check out the backups made with FreeGee when you unlock, to see if it matches with what was actually written to the phone. In order to see if they are equal, we need to trim the backup, because the backup that is taken is actually of the entire partition, not just the actual data.
$ dd bs=1 count=7340032 if=boot-att-backup.img of=boot-att-backup-trimmed.img
Click to expand...
Click to collapse
This is doing basically the same, starting at the first byte, copying 7340032 bytes to boot-att-backup-trimmed.img. This is just making sure you only get the same amount of data that was written.
Now, If of course we want to see if the data is actually the same, so we will also use the diff command, also found on linux, and I'm sure is also available on windows.
$ diff -s boot.img boot-att-backup-trimmed.img
Click to expand...
Click to collapse
If both files are identical, which means everything was done correctly, this should result in the output "Files boot.img and boot-att-backup-trimmed.img are identical", which it does! (The -s flag makes diff report identical files.)
So, now that we know that we can successfully extract the boot partition, I also tried this with the aboot partition, and it worked as well! I have not had success extracting the system partition yet, as it is split up into several partitions. I was hoping that someone with more knowledge could piece together a system image. Enjoy

SnowLeopardJB said:
Hello everyone!
First off:
DISCLAIMER: I AM NOT RESPONSIBLE FOR ANYTHING YOU DO TO YOUR PHONE WHILE USING ANY OF THE INFORMATION LOCATED BELOW. IF YOU DO NOT UNDERSTAND WHAT IS BEING DONE, PLEASE DO NOT TRY ANYTHING DONE HERE!
This is still in a VERY basic phase. I am not sure how helpful it will be, but currently, I have been able to extract some of the smaller partitions from the AT&T firmware file.
Starting off, when LGNPST is used to image a phone, it creates a log file in C:\LG Electronics\LGNPST\Models\LOG\ For example, mine was called LS970Log_COM5.log. We are really only interested in one part of this file, located close to the bottom when the phone is actually being imaged. It should look something like this:
What do we see that is important here? Image sizes and offsets for data in the file! For example, lets take the boot partition.
We have a offset of 0x3980000 and a size of 7168Kb. That converts to an equivalent of an offset of 60293120 bytes and a size of 7340032 bytes (I really hope I got that right. As I'm sitting here writing this, I'm thinking of how many different ways I could have messed up that calculation...)
Here, I am using dd on linux in order to separate the partitions from the binary file, but it can be done using equivalent tools on windows.
Basically, what I am doing here is copying 7340032 bytes, starting at byte 60293120, from the .tot file to boot.img.
Now, lets check out the backups made with FreeGee when you unlock, to see if it matches with what was actually written to the phone. In order to see if they are equal, we need to trim the backup, because the backup that is taken is actually of the entire partition, not just the actual data.
This is doing basically the same, starting at the first byte, copying 7340032 bytes to boot-att-backup-trimmed.img. This is just making sure you only get the same amount of data that was written.
Now, If of course we want to see if the data is actually the same, so we will also use the diff command, also found on linux, and I'm sure is also available on windows.
If both files are identical, which means everything was done correctly, this should result in the output "Files boot.img and boot-att-backup-trimmed.img are identical", which it does! (The -s flag makes diff report identical files.)
So, now that we know that we can successfully extract the boot partition, I also tried this with the aboot partition, and it worked as well! I have not had success extracting the system partition yet, as it is split up into several partitions. I was hoping that someone with more knowledge could piece together a system image. Enjoy
Click to expand...
Click to collapse
would it be possible to guide me through this from the very beginning? i want to start cooking for this device, but i need a legit flashable Rom. Please and Thank you.

You are most likely better off just pulling a system image off your device. So, if you are rooted, you can pull your system with something like this:
# busybox tar cf /sdcard/system.tar /system/*
Click to expand...
Click to collapse
That should give you all of the system files all together in a tar archive on your internal sdcard.

I messaged you, but is there any way to use this on the Sprint version to create a flashable .zip?

sorry about the resurrection,
but has there been any progress made on this? More of a curiosity, then anything.
Thanks

Related

[REF] bml* partition layout

LAYOUT MAPPING COMPLETE! THANKS EVERYONE!​
based on XXJF5 stock 2.1#1
256 KB -- bml1, contain boot.bin (262144 bytes), Primary Boot Loader (low-level hardware initialization)
256 KB -- bml2, contains PIT file first 512 bytes
10240 KB -- bml3 /dev/block/stl3 /efs
1280 KB -- bml4 contain Sbl.bin (1310720 bytes) Secondary Boot Loader (loads the Linux kernel and passes the necessary arguments)
1280KB -- bml5 contains Secondary Boot Loader (for recovery, ect)
5120KB -- bml6 param.lfs /mnt/.lfs j4fs
7680KB -- bml7 contain zImage and initramfs
7680KB -- bml8 empty
293376KB -- bml9 factoryfs.rfs ( /system RFS Partition) /dev/block/stl9
137216KB -- bml10 dbdata.rfs ( /dbdata RFS Partition) /dev/block/stl10
35840KB -- bml11 cache.rfs ( /cache RFS Partition) /dev/block/stl11
12800KB -- bml12 modem.bin
Hello husq510
Thanks for this infos, i'll follow this thread closely because i'm looking for the place where ServiceMode settings are stored.
anyone tried writing to the bml directly?
husq510 said:
bash-3.2# ls -al /dev/block/bml*
1280 KB -- bml4 kernel (zImage)
293376KB -- bml9 factoryfs.rfs ( /system RFS Partition)
Click to expand...
Click to collapse
interesting. so ive dd the bml4 and bml9 of optus australia stock 19000DTJF3. now anyone want to point me in the direction of creating an odin package out of it.
i whoner .... how can bml4 be the zImage? bml4=1.2MB, zImage=5.8MB ?? also if it should just contain the kernel without initram, it's still about 2.6MB? any idea?
jodue said:
i whoner .... how can bml4 be the zImage? bml4=1.2MB, zImage=5.8MB ?? also if it should just contain the kernel without initram, it's still about 2.6MB? any idea?
Click to expand...
Click to collapse
you are right, cant be. then kernel must be in some other bml place, seems bml7.
gandalf:~/Desktop/android/bml ackie$ grep "booting the kernel" *
Binary file bml7.dump matches
gandalf:~/Desktop/android/bml ackie$ hexdump -n 128 bml7.dump | grep "e1a0 0000 e1a0"
0000000 0000 e1a0 0000 e1a0 0000 e1a0 0000 e1a0
0000020 0002 ea00 [2818 016f] [0000 0000] [a510 005b] <- zimage magic number 0x016F2818, start at 0x0, end at 0x005b10a5
0000030 7001 e1a0 8002 e1a0 2000 e10f 0003 e312
0000040 0001 1a00 0017 e3a0 3456 ef12 2000 e10f
0000050 20c0 e382 f002 e121 0000 0000 0000 0000
0000060 00d0 e28f 307e e890 0001 e050 000a 0a00
0000070 5000 e085 6000 e086 c000 e08c 2000 e082
0000080
Offset into zImage Value Description
0x24 0x016F2818 Magic number used to identify this is an ARM Linux zImage
0x28 start address The address the zImage starts at
0x2C end address The address the zImage ends at
so if you start at 0x0 of bml7 and read untill offset inside 0x2c for XXJF5 is 0x005b10a5 you have your zImage.
husq510 said:
so if you start at 0x0 of bml7 and read untill offset inside 0x2c for XXJF5 is 0x005b10a5 you have your zImage.
Click to expand...
Click to collapse
so is it safe to assume after 0x005b10a5 is the ram disk?
Hello Folks.
I found some interesting bits in bml12.
"Service Mode" datas strings are in it, like show these example :
Code:
strings ./bml12 | grep Diamond
[SND] TurnON UtaAudioModifyHf(prev_Diamond_mode:0x%x)
`[SND]DiamondVoice_GetMode : path = 0x%x, Diamond_mode = 0x%x
`[SND]DiamondVoice_GetMode : Diamond_mode = 0x%x
[SND]DiamondVoiceTXcfgMSG
`[SND] DiamondVoice_RxInit : DiamondVoice_Mode_v = 0x%x
Diamond Solution
[9] Diamond Solution
[SND]DiamondVoice_Config : DiamondVoice_Mode_v = 0x%x, Diamond_mode= 0x%x
strings ./bml12 | grep DEBUG
MN_GPS_DEBUG_INFO_CNF
GPS_DEBUG_INFO_CNF
[1] DEBUG SCREEN
[2] DEBUG INFO
DEBUG INFO
DEBUG MSG 115200
DEBUG MSG SETTING FAIL
DEBUG MSG 921600
DEBUG MSG ON
DEBUG MSG OFF
AUDIO_LIB_DSP_DEBUG_GRP1
AUDIO_LIB_DSP_DEBUG_GRP2
AUDIO_LIB_DSP_DEBUG_GRP3
AUDIO_LIB_DSP_DEBUG_GRP4
AUDIO_LIB_DSP_DEBUG_GRP5
AUD_LIB_DSP_DEBUG
IPC_MISC_PHONE_DEBUG
IPC_MISC_DEBUG_LEVEL
IPC_SVC_DEBUG_DUMP
IPC_SVC_DEBUG_STRING
And I found my IMEI number in bml3
edit :
+ some MAC hardware address too (but not the Wifi one)
+ the HW Version : MP 0.800
I guess that bml3 is device-specific.
But I don't know if it's the source of specific values or just contains copy of hardware-related data.
In the first case, modifying bml3 would allow to change IMEI or other sensitive values ^^
nonato said:
so is it safe to assume after 0x005b10a5 is the ram disk?
Click to expand...
Click to collapse
nope, to extract the ram disk, u hv to find the magic number of gz and extract the gzip image out... i was able to get the directory listing of the ramdisk but not the content..
the other problem is after u get the ramdisk and do any modifications, u hv to reverse the process.. not an easy job but if anyone found a solution, please share.
anyone try writing to the bml directly? dd doesnt seem to work
anyway, its possible to extract the image and use odin to flash after tar but if can write to bml directly, clockworkmod can effectively backup/restore the kernel.. (just a thought)
raspdeep said:
nope, to extract the ram disk, u hv to find the magic number of gz and extract the gzip image out... i was able to get the directory listing of the ramdisk but not the content..
the other problem is after u get the ramdisk and do any modifications, u hv to reverse the process.. not an easy job but if anyone found a solution, please share.
anyone try writing to the bml directly? dd doesnt seem to work
anyway, its possible to extract the image and use odin to flash after tar but if can write to bml directly, clockworkmod can effectively backup/restore the kernel.. (just a thought)
Click to expand...
Click to collapse
No, you cant write directly to bml.
Data write to a sector involves following sequence of low-level flash operations:
1. Block copy for back-up
2. Block erase
3. Copy back for non-modified pages
4. Writing the sector data to the modified page
These sequences of operations are not atomic, so a write request to this block device driver is prone to data corruption. For this reason, read-only file systems such as CRAMFS are adequate to run on top of this block device driver.
use this small script to extract your current zImage:
offset=`dd if=/dev/block/bml7 bs=1 skip=44 count=4 2>/dev/null| hexdump -e '1/4 "%d"' -e '"\n"'`
echo $offset
dd if=/dev/block/bml7 bs=1 count=$offset of=/sdcard/zImage_backup
husq510 said:
use this small script to extract your current zImage:
Click to expand...
Click to collapse
nice, thanks for sharing that!
i just extracted initramfs from bml7, file attached, unzip and cpio -i
some file differs from leshak:
modules/dpram.ko
modules/multipdp.ko
modules/dhd.ko
modules/stgloc
initramfs/init.rc
.info/rootfs.info
default.prop
init.smdkc110.sh
sbin/recovery
sbin/init
how do u extract this?
gunzip -c initrd-cpio.zip | cpio -i does not work.. gave errors
how did you dump and make the zip file you have attached?
thanks,
husq510 said:
i just extracted initramfs from bml7, file attached, unzip and cpio -i
some file differs from leshak:
modules/dpram.ko
modules/multipdp.ko
modules/dhd.ko
modules/stgloc
initramfs/init.rc
.info/rootfs.info
default.prop
init.smdkc110.sh
sbin/recovery
sbin/init
Click to expand...
Click to collapse
raspdeep said:
how do u extract this?
gunzip -c initrd-cpio.zip | cpio -i does not work.. gave errors
Click to expand...
Click to collapse
[email protected] you have to use unzip instead gzip, cuz forum dislike .gz format, so I had to use standard zip.
mkdir initramfs
mv initrd-cpio.zip initramfs
cd initramfs
unzip initrd-cpio.zio
cat initrd.cpio | cpio -i --no-absolute-filenames
Hey, did somebody already tried to dump one or some bml partitions and restore them later ?
I guess this could be the ultimate backup tool.
I took a look into this and found that
bml2 : PIT file is here
bml5 : Sbl.bin is here
I opened it with a Hexeditor and compared with things from the firmware.
My device is running on JP3, froyo, at the moment.
thanks i will update first post. layout mapping is complete now!

Need a bit of help

Hey everyone, I'm new here and I finally decided to root my g2. I'm using the cyanogenmod wiki entry. I am at the point where it says to write "./gfree -f -b hboot-eng.img -y recovery.img" though every time I do this it says:
# ./gfree -f -b hboot-eng.img -y recovery.img
./gfree -f -b hboot-eng.img -y recovery.img
--secu_flag off set
--cid set. CID will be changed to: 11111111
--sim_unlock. SIMLOCK will be removed
--hboot set. hboot image hboot-eng.img will be installed in partition 18
--recovery set. recovery image recovery.img will be installed in partition 21
Section header entry size: 40
Number of section headers: 44
Total section header table size: 1760
Section header file offset: 0x000138b4 (80052)
Section index for section name string table: 41
String table offset: 0x000136fb (79611)
Searching for .modinfo section...
- Section[16]: .modinfo
-- offset: 0x00000a14 (2580)
-- size: 0x000000cc (204)
Kernel release: 2.6.32.17-g814e0a1
New .modinfo section size: 204
Attempting to power cycle eMMC... OK.
Write protect was successfully disabled.
Searching for mmc_blk_issue_rq symbol...
- Address: c02a8d44, type: t, name: mmc_blk_issue_rq, module: N/A
Kernel map base: 0xc02a8000
Kernel memory mapped to 0x40002000
Searching for brq filter...
- Address: 0xc02a8d44 + 0x34c
- ***WARNING***: Found fuzzy match for brq filter, but conditional branch isn't
. (0xea000012)
Backing up current partition 18 and installing specified hboot image...
Backing up partition /dev/block/mmcblk0p18 to /sdcard/part18backup-1313372731.bi
n ...
Writing image hboot-eng.img to partition /dev/block/mmcblk0p18 ...
Error opening input image.
is this normal? if it helps, I continue on to write
./root_psn
sync
and nothing happens. Thanks ahead of time for any help.
Nevermind. I just went through every step again and it worked.

[ROM] [STOCK] + insecure boot image (adb root) + deodexed system

I would like to share a collection of factory images. It contains the full packages, also the extracted .img files. I also included insecure boot image (adb shell gives root access) and deodexed system image for each of them.
full image packages are "tgz" files.
image files extension is .img
isecure boot images are *.unsec.img
deodexed system images are *.deodex.img
These are all to be flashed with fastboot. These all derived from STOCK (https://developers.google.com/android/nexus/images) with no changes except the insecure adb boot image and the deodexed system image.
Deodexed fs is exactly the same size as the original when mounted.
The collection contains:
mantaray_4.2-jop40c
mantaray_4.2-jop40c-factory-0d641789.tgz size: 326396069
mantaray-jop40c
image-mantaray-jop40c.zip size: 328044861
boot.img size: 4716544
boot.img.unsec.img size: 4716544
bootloader-manta-mantalj12.img size: 1310720
cache.img size: 10617136
recovery.img size: 5228544
system.img size: 541540212
system.img.deodex.img size: 499677904
mantaray_4.2.2-jdq39
mantaray-jdq39-factory-d79f489e.tgz size: 328019721
mantaray-jdq39
image-mantaray-jdq39.zip size: 329787974
boot.img size: 4718592
boot.img.unsec.img size: 4718592
bootloader-manta-mantalj12.img size: 1310720
cache.img size: 10621244
recovery.img size: 5230592
system.img size: 535248732
system.img.deodex.img size: 496339676
userdata.img size: 140778452
The files can be downloaded from: http://web.djodjo.org/?a=download:android:ROM_images:factory_images_gn_mantaray
if it helps you buy me a beer

Someone know how to push to push recovery or .img/.bin files via Ubuntu?

Can someone tell me how to push recovery or .img/.bin files via Ubuntu?
Issue: When flashing Clodyg5 2.5 ATT was chosen instead of Tmobile
I have already search all the threads and forums unless I missed something. I have tried all the methods and only seems to be hope in Ubuntu
Here's what I have already tried so far:
1. KDZ and TOT methods and both fail.
2. I tried forcing the device into QHUSB 9008/ Test mode and using BoardDiag3.99c.exe and that also fails with the error displayed to put the device into Dload mode.
3. ADB with fastboot. Does not detect device even though it shows LGE Android device in device manager
4. Used Latest drivers
5. Used XP, Win 7 and Win 8 same results
6. What I can do is see the partitions in Ubuntu. I need the correct command to push the .bin/.img files extracted from the TOT or KDZ and push them via Ubuntu. I was able to do it to an SD Card to try to boot off of it as done for the G2. In other words I copied the bin and recovery to a micro sd and tried to boot off of it but nothing happened.
So this is as far as I can get in Ubuntu:
~$ ls /dev/sd*
/dev/sda /dev/sda1 /dev/sda2 /dev/sda5
[email protected]:~# gdisk -l /dev/sda
GPT fdisk (gdisk) version 0.8.8
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present
***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory.
***************************************************************
Disk /dev/sda: 41943040 sectors, 20.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 86525607-AEFC-47E3-A2D2-06EB166B5267
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 41943006
Partitions will be aligned on 2048-sector boundaries
Total free space is 6077 sectors (3.0 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 39845887 19.0 GiB 8300 Linux filesystem
5 39847936 41940991 1022.0 MiB 8200 Linux swap
[email protected]:~# gdisk -l /dev/sda1
GPT fdisk (gdisk) version 0.8.8
Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present
Creating new GPT entries.
Disk /dev/sda1: 39843840 sectors, 19.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 3FFEC32B-2D8F-483A-9325-437E5CC6AB8D
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 39843806
Partitions will be aligned on 2048-sector boundaries
Total free space is 39843773 sectors (19.0 GiB)
Number Start (sector) End (sector) Size Code Name
[email protected]:~# gdisk -l /dev/sda2
GPT fdisk (gdisk) version 0.8.8
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present
***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory.
***************************************************************
Warning! Main partition table overlaps the first partition by 32 blocks!
You will need to delete this partition or resize it in another utility.
Disk /dev/sda2: 2 sectors, 1024 bytes
Logical sector size: 512 bytes
Disk identifier (GUID): D87AD6B9-A79F-4AB6-9139-171BE2D5DDC4
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 18446744073709551584
Partitions will be aligned on 2-sector boundaries
Total free space is 18446744073707458527 sectors (8.0 ZiB)
Number Start (sector) End (sector) Size Code Name
1 2 2093057 1022.0 MiB 8200 Linux swap
[email protected]:~# gdisk -l /dev/sda5
GPT fdisk (gdisk) version 0.8.8
Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present
Creating new GPT entries.
Disk /dev/sda5: 2093056 sectors, 1022.0 MiB
Logical sector size: 512 bytes
Disk identifier (GUID): 57A1286F-0AD3-467A-A46B-457AA89BC218
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 2093022
Partitions will be aligned on 2048-sector boundaries
Total free space is 2092989 sectors (1022.0 MiB)
Number Start (sector) End (sector) Size Code Name
[email protected]:~#
I have already extracted the TOT and KDZ and have recovery.img just don't want to fully brick it.
Links I used as reference:
http://forum.xda-developers.com/showthread.php?t=2345860
http://forum.xda-developers.com/showthread.php?t=2582142
http://forum.xda-developers.com/showthread.php?t=2600575
Issue resolved, please close this thread. Thanks to everyone who chimed in with their suggestions.

Question system backup

Hoping I can get some assistance. Seeing as TWRP isn't a viable option right now for the OnePlus 11, I'm curious if there is a good way to do a full system backup/restore (mimic what TWRP did) using ADB or some other native way or application. When I last played around with Titanium I didn't see a good way of performing this task. It's possible I wasn't doing it correctly, but I was playing around with the batch options and couldn't get it to do anything.
Anyway, my thought was to write a powershell script and backup all the partitions that way, but here is my question. On my oneplus 11 (I have the CPH2451 model) I can go to "/dev/block/by-name" and see all the partitions. I can use the adb shell dd if of command to copy it to my sd card and then pull it on to my computer for example, but is this the proper process to back up the system, data, settings?
I notice in TWRP when you go through the backup process, you have the option to backup boot, system, vendor/OEM, data, modem, efs partitions. That leads me to my next question when I traverse through the path I posted above, there are a ton of partitions there, not to mention many duplicate for exable boot_a and boot_b. So when I back it up would I need to back up everything or is there a fast & clean way to backup the minimum required data without missing anything important?
Root and try Swift for app, phone, sms backups.
Otherwise, since almost none of the other partitions are writable anymore, it's pretty pointless backing them up. But you could with DD (again, you would need to be rooted)... fastboot and fastbootd should be capable of writing the partitions back to the device.
All you need to backup is /data since all others are included in your firmware. Problem when do a backup of /data: You need to perform the backup while system is running. You can't access /data from outside the system without TWRP. If you perform a backup use Termux and the tar command for it. The built in tar command of Android is very limited. Termux offers you a full version of tar.
kevp75 said:
Root and try Swift for app, phone, sms backups.
Otherwise, since almost none of the other partitions are writable anymore, it's pretty pointless backing them up. But you could with DD (again, you would need to be rooted)... fastboot and fastbootd should be capable of writing the partitions back to the device.
Click to expand...
Click to collapse
Thanks for your reply. My device is rooted so that's not a problem. It's just a shame that TWRP doesn't seem to be a viable option. As far as SMS back goes, I'm not too concerned about that because I primarily use google voice, so basically all my contacts and SMS/MMS is saved in the cloud. My biggest concern is just getting a working backup of the system/configurations because I tend to do quite a bit of customizations on my phone and it would suck having to redo everything.
WoKoschekk said:
All you need to backup is /data since all others are included in your firmware. Problem when do a backup of /data: You need to perform the backup while system is running. You can't access /data from outside the system without TWRP. If you perform a backup use Termux and the tar command for it. The built in tar command of Android is very limited. Termux offers you a full version of tar.
Click to expand...
Click to collapse
Thank you as well for your reply. I'm assuming termux is a android based terminal? if termux can do it; would adb/adb shell be able to? The only reason I ask is because it's much easier to type commands from a computer than on the phone. Also what commands would I use? Is there a tut I can follow?
m0d hipp¥ said:
termux can do it; would adb/adb shell be able to?
Click to expand...
Click to collapse
Yes, Termux is an app. ADB could do, but with ADB you have only access to Android's built in commands in /system/bin. Termux offers an own environment with full versions of all the limited built in ones.
WoKoschekk said:
Yes, Termux is an app. ADB could do, but with ADB you have only access to Android's built in commands in /system/bin. Termux offers an own environment with full versions of all the limited built in ones.
Click to expand...
Click to collapse
That makes sense. I'll have to play around with it after work and see what I can figure out. Thanks
There are a few things to take care of. I'll post them later here.
For those who are not rooted:
OnePlus Clone Phone app allows to create full backs by copying apps and their data to a different OnePlus/Oppo phone.
adb backup/restore has long stopped working "thanks" to Google.
Sorry I haven't had a chance to test the methods above, but just to be more clear on my end, I'm not super concerned about backing up apps because there are several ways of doing that. Lucky patcher among other tools allows you to backup apps & app settings. I'm a bit more concerned about system settings/configurations. For example if I wanted to do a backup of my current state the system is in. I have over 100 apps disabled and having to redo that is a bit tedious. Not only that, but also all the configurations I have made within the system settings I'd like to save those as well. So this is really what I'm targeting.
EDIT:
For starters I wrote this simple script in Powershell that gets all the partitions on my device.
Code:
$Partition_Path = "/dev/block/bootdevice/by-name"
foreach($Partition in $(adb shell ls $Partition_Path))
{
$Partition
}
The output is the following:
Code:
ALIGN_TO_128K_1
ALIGN_TO_128K_2
DRIVER
abl_a
abl_b
aop_a
aop_b
aop_config_a
aop_config_b
apdp
apdp_full
apdpb
bluetooth_a
bluetooth_b
boot_a
boot_b
cdt
connsec
cpucp_a
cpucp_b
ddr
devcfg_a
devcfg_b
devinfo
dinfo
dip
dsp_a
dsp_b
dtbo_a
dtbo_b
engineering_cdt_a
engineering_cdt_b
featenabler_a
featenabler_b
frp
fsc
fsg
hyp_a
hyp_b
imagefv_a
imagefv_b
init_boot_a
init_boot_b
keymaster_a
keymaster_b
keystore
last_parti
limits
limits-cdsp
logdump
logfs
mdcompress
mdm1oemnvbktmp
mdtp_a
mdtp_b
mdtpsecapp_a
mdtpsecapp_b
metadata
misc
modem_a
modem_b
modemst1
modemst2
multiimgoem_a
multiimgoem_b
multiimgqti_a
multiimgqti_b
ocdt
oplus_sec_a
oplus_sec_b
oplusdycnvbk
oplusreserve1
oplusreserve2
oplusreserve3
oplusreserve4
oplusreserve5
oplusstanvbk_a
oplusstanvbk_b
param
persist
preisp_dt
preisp_dt_bk
preisp_otp
qmcs
qupfw_a
qupfw_b
qweslicstore_a
qweslicstore_b
rawdump
recovery_a
recovery_b
rtice
rticmpdata_a
rticmpdata_b
secdata
shrm_a
shrm_b
splash_a
splash_b
splash_odm
spunvm
ssd
storsec
super
toolsfv
tz_a
tz_b
tzsc
uefi_a
uefi_b
uefisecapp_a
uefisecapp_b
uefivarstore
userdata
vbmeta_a
vbmeta_b
vbmeta_system_a
vbmeta_system_b
vbmeta_vendor_a
vbmeta_vendor_b
vendor_boot_a
vendor_boot_b
vm-bootsys_a
vm-bootsys_b
vm-data
vm-persist
xbl_a
xbl_b
xbl_config_a
xbl_config_b
xbl_ramdump_a
xbl_ramdump_b
xbl_sc_logs
xbl_sc_test_mode
My question is if I went the termux route or the adb shell route to try and do a backup using the command:
Code:
adb exec-out "su -c dd if=$Partition_Path/$Partition of=/sdcard/Backup/$Partition.img"
which of these partitions would be the ones I should focus on backing up? By the way, there are 3 partitions that are HUGE so I don't think they're necessary, but let me know if they are. The 3 partitions are super, userdata, and logdump. By the way userdata is like over 100Gb, and that's unrealistic because my phone def doesn't have that much data on there.
m0d hipp¥ said:
Sorry I haven't had a chance to test the methods above, but just to be more clear on my end, I'm not super concerned about backing up apps because there are several ways of doing that. Lucky patcher among other tools allows you to backup apps & app settings. I'm a bit more concerned about system settings/configurations. For example if I wanted to do a backup of my current state the system is in. I have over 100 apps disabled and having to redo that is a bit tedious. Not only that, but also all the configurations I have made within the system settings I'd like to save those as well. So this is really what I'm targeting.
EDIT:
For starters I wrote this simple script in Powershell that gets all the partitions on my device.
Code:
$Partition_Path = "/dev/block/bootdevice/by-name"
foreach($Partition in $(adb shell ls $Partition_Path))
{
$Partition
}
The output is the following:
Code:
ALIGN_TO_128K_1
ALIGN_TO_128K_2
DRIVER
abl_a
abl_b
aop_a
aop_b
aop_config_a
aop_config_b
apdp
apdp_full
apdpb
bluetooth_a
bluetooth_b
boot_a
boot_b
cdt
connsec
cpucp_a
cpucp_b
ddr
devcfg_a
devcfg_b
devinfo
dinfo
dip
dsp_a
dsp_b
dtbo_a
dtbo_b
engineering_cdt_a
engineering_cdt_b
featenabler_a
featenabler_b
frp
fsc
fsg
hyp_a
hyp_b
imagefv_a
imagefv_b
init_boot_a
init_boot_b
keymaster_a
keymaster_b
keystore
last_parti
limits
limits-cdsp
logdump
logfs
mdcompress
mdm1oemnvbktmp
mdtp_a
mdtp_b
mdtpsecapp_a
mdtpsecapp_b
metadata
misc
modem_a
modem_b
modemst1
modemst2
multiimgoem_a
multiimgoem_b
multiimgqti_a
multiimgqti_b
ocdt
oplus_sec_a
oplus_sec_b
oplusdycnvbk
oplusreserve1
oplusreserve2
oplusreserve3
oplusreserve4
oplusreserve5
oplusstanvbk_a
oplusstanvbk_b
param
persist
preisp_dt
preisp_dt_bk
preisp_otp
qmcs
qupfw_a
qupfw_b
qweslicstore_a
qweslicstore_b
rawdump
recovery_a
recovery_b
rtice
rticmpdata_a
rticmpdata_b
secdata
shrm_a
shrm_b
splash_a
splash_b
splash_odm
spunvm
ssd
storsec
super
toolsfv
tz_a
tz_b
tzsc
uefi_a
uefi_b
uefisecapp_a
uefisecapp_b
uefivarstore
userdata
vbmeta_a
vbmeta_b
vbmeta_system_a
vbmeta_system_b
vbmeta_vendor_a
vbmeta_vendor_b
vendor_boot_a
vendor_boot_b
vm-bootsys_a
vm-bootsys_b
vm-data
vm-persist
xbl_a
xbl_b
xbl_config_a
xbl_config_b
xbl_ramdump_a
xbl_ramdump_b
xbl_sc_logs
xbl_sc_test_mode
My question is if I went the termux route or the adb shell route to try and do a backup using the command:
Code:
adb exec-out "su -c dd if=$Partition_Path/$Partition of=/sdcard/Backup/$Partition.img"
which of these partitions would be the ones I should focus on backing up? By the way, there are 3 partitions that are HUGE so I don't think they're necessary, but let me know if they are. The 3 partitions are super, userdata, and logdump. By the way userdata is like over 100Gb, and that's unrealistic because my phone def doesn't have that much data on there.
Click to expand...
Click to collapse
All settings and apps and app data is stored on /data. If you backup /data and save it on /sdcard (which is the path /data/media/0) your backup runs infinitely
TWRP does a backup either by dd or with tar. The command dd creates an image and tar an archive. It doesn't make sense to create an image of /data for two reasons: encryption will be corrupt and you don't have enough storage space on /data to save an image of /data.
What TWRP does: Create an archive of /data with tar, but exclude /data/media. It looks like this in Termux:
Code:
tar -cv --exclude='media/*' --file=/storage/$EXT/data.ext4.win000 /data
This saves the backup on an external sd. You can change it to
Code:
tar -cv --exclude='media/*' --file=/data/media/0/data.ext4.win000 /data
for saving the backup in your internal storage.
WoKoschekk said:
All settings and apps and app data is stored on /data. If you backup /data and save it on /sdcard (which is the path /data/media/0) your backup runs infinitely
Click to expand...
Click to collapse
So basically infinite loop? Is there any way to break out of it? Or what if I back it up to another partition that has RW and then when it's done move it to the sdcard?
Also I'm trying to understand how to use tar with exec-out. Would it be something like this:
Code:
adb exec-out "su -c dd if=/dev/block/bootdevice/by-name/userdata && tar -cz -p --exclude='media*' --exclude='*-cache' /sdcard/userdata.tar"
it's also possible to split the archive in several parts:
Code:
tar -cv --exclude='media/*' -ML 1572864 --file=/data/media/0/data.ext4.win000 --file=/data/media/0/data.ext4.win001 --file=/data/media/0/data.ext4.win002 /data
this way you get 3 parts with a size of 1,5GB for each of it.
please wait, it's a bit more complicated
do you have a TWRP backup of any phone?
Unfortunately I don't have a phone with TWRP. I do have a oneplus 9 Pro (LE2125) on hand, but it doesn't have TWRP either. As far as I am aware TWRP isn't available for the OP9 pro.
By the way, I really appreciate your help and your examples. Thank you!
m0d hipp¥ said:
Unfortunately I don't have a phone with TWRP. I do have a oneplus 9 Pro (LE2125) on hand, but it doesn't have TWRP either. As far as I am aware TWRP isn't available for the OP9 pro.
By the way, I really appreciate your help and your examples. Thank you!
Click to expand...
Click to collapse
The 9 pro has twrp and it works on oos13 too.
m0d hipp¥ said:
Unfortunately I don't have a phone with TWRP. I do have a oneplus 9 Pro (LE2125) on hand, but it doesn't have TWRP either. As far as I am aware TWRP isn't available for the OP9 pro.
By the way, I really appreciate your help and your examples. Thank you!
Click to expand...
Click to collapse
Ok, here is a part of the recovery.log by TWRP. It starts with the beginning of a backup of /data:
Code:
I:operation_start: 'Nandroid'
Updating partition details...
I:Data backup size is 5760MB, free: 43310MB.
I:Unable to mount '/usb-otg'
I:Actual block device: '', current file system: 'auto'
...done
I:Backup Name is: '2023-06-07--22-01-50'
I:Backup_Folder is: '/external_sd/TWRP/BACKUPS/ZY322V8K28/2023-06-07--22-01-50'
I:Calculating backup details...
* Total number of partitions to back up: 1
* Total size of all data: 5760MB
* Available space: 53009MB
[BACKUP STARTED]
* Backup Folder: /external_sd/TWRP/BACKUPS/ZY322V8K28/2023-06-07--22-01-50
Invalid encryption mode file /data/unencrypted/mode
Backing up Data (excl. storage)...
Backups of Data do not include any files in internal storage such as pictures or downloads.
Invalid encryption mode file /data/unencrypted/mode
Breaking backup file into multiple archives...
I:Creating backup...
I:Creating tar file '/external_sd/TWRP/BACKUPS/ZY322V8K28/2023-06-07--22-01-50/data.ext4.win000'
I:addFile '/data/ota' including root: 1
==> set selinux context: u:object_r:ota_data_file:s0
Click to expand...
Click to collapse
TWRP does exclude the "storage" which is /data/media. This directory gets always mounted as /storage/emulated/0 for security reasons on every Android phone.The path /storage/emulated/0 is the sdcardfs (virtual filesystem, see here for more info). Additionally it's always linked as /sdcard in the system.
So, /data/media = /storage/emulated/0 = /sdcard!
The log shows also that TWRP saves the files of /data as a tar archive. But tar ≠ tar if you compare Android's tar with the one of Termux.
Android's tar:
Code:
usage: tar -[cxtjzhmvO] [-X FILE] [-T FILE] [-f TARFILE] [-C DIR]
Create, extract, or list files from a tar file
Operation:
c Create
f Name of TARFILE ('-' for stdin/out)
h Follow symlinks
j (De)compress using bzip2
m Don't restore mtime
t List
v Verbose
x Extract
z (De)compress using gzip
C Change to DIR before operation
O Extract to stdout
exclude=FILE File to exclude
X File with names to exclude
T File with names to include
Termux:
Code:
Usage: tar [OPTION...] [FILE]...
GNU 'tar' saves many files together into a single tape or disk archive, and can
restore individual files from the archive.
Examples:
tar -cf archive.tar foo bar # Create archive.tar from files foo and bar.
tar -tvf archive.tar # List all files in archive.tar verbosely.
tar -xf archive.tar # Extract all files from archive.tar.
Main operation mode:
-A, --catenate, --concatenate append tar files to an archive
-c, --create create a new archive
--delete delete from the archive (not on mag tapes!)
-d, --diff, --compare find differences between archive and file system
-r, --append append files to the end of an archive
--test-label test the archive volume label and exit
-t, --list list the contents of an archive
-u, --update only append files newer than copy in archive
-x, --extract, --get extract files from an archive
Operation modifiers:
--check-device check device numbers when creating incremental
archives (default)
-g, --listed-incremental=FILE handle new GNU-format incremental backup
-G, --incremental handle old GNU-format incremental backup
--hole-detection=TYPE technique to detect holes
--ignore-failed-read do not exit with nonzero on unreadable files
--level=NUMBER dump level for created listed-incremental archive
--no-check-device do not check device numbers when creating
incremental archives
--no-seek archive is not seekable
-n, --seek archive is seekable
--occurrence[=NUMBER] process only the NUMBERth occurrence of each file
in the archive; this option is valid only in
conjunction with one of the subcommands --delete,
--diff, --extract or --list and when a list of
files is given either on the command line or via
the -T option; NUMBER defaults to 1
--sparse-version=MAJOR[.MINOR]
set version of the sparse format to use (implies
--sparse)
-S, --sparse handle sparse files efficiently
Local file name selection:
--add-file=FILE add given FILE to the archive (useful if its name
starts with a dash)
-C, --directory=DIR change to directory DIR
--exclude=PATTERN exclude files, given as a PATTERN
--exclude-backups exclude backup and lock files
--exclude-caches exclude contents of directories containing
CACHEDIR.TAG, except for the tag file itself
--exclude-caches-all exclude directories containing CACHEDIR.TAG
--exclude-caches-under exclude everything under directories containing
CACHEDIR.TAG
--exclude-ignore=FILE read exclude patterns for each directory from
FILE, if it exists
--exclude-ignore-recursive=FILE
read exclude patterns for each directory and its
subdirectories from FILE, if it exists
--exclude-tag=FILE exclude contents of directories containing FILE,
except for FILE itself
--exclude-tag-all=FILE exclude directories containing FILE
--exclude-tag-under=FILE exclude everything under directories
containing FILE
--exclude-vcs exclude version control system directories
--exclude-vcs-ignores read exclude patterns from the VCS ignore files
--no-null disable the effect of the previous --null option
--no-recursion avoid descending automatically in directories
--no-unquote do not unquote input file or member names
--no-verbatim-files-from -T treats file names starting with dash as
options (default)
--null -T reads null-terminated names; implies
--verbatim-files-from
--recursion recurse into directories (default)
-T, --files-from=FILE get names to extract or create from FILE
--unquote unquote input file or member names (default)
--verbatim-files-from -T reads file names verbatim (no escape or option
handling)
-X, --exclude-from=FILE exclude patterns listed in FILE
File name matching options (affect both exclude and include patterns):
--anchored patterns match file name start
--ignore-case ignore case
--no-anchored patterns match after any '/' (default for
exclusion)
--no-ignore-case case sensitive matching (default)
--no-wildcards verbatim string matching
--no-wildcards-match-slash wildcards do not match '/'
--wildcards use wildcards (default for exclusion)
--wildcards-match-slash wildcards match '/' (default for exclusion)
Overwrite control:
--keep-directory-symlink preserve existing symlinks to directories when
extracting
--keep-newer-files don't replace existing files that are newer than
their archive copies
-k, --keep-old-files don't replace existing files when extracting,
treat them as errors
--no-overwrite-dir preserve metadata of existing directories
--one-top-level[=DIR] create a subdirectory to avoid having loose files
extracted
--overwrite overwrite existing files when extracting
--overwrite-dir overwrite metadata of existing directories when
extracting (default)
--recursive-unlink empty hierarchies prior to extracting directory
--remove-files remove files after adding them to the archive
--skip-old-files don't replace existing files when extracting,
silently skip over them
-U, --unlink-first remove each file prior to extracting over it
-W, --verify attempt to verify the archive after writing it
Select output stream:
--ignore-command-error ignore exit codes of children
--no-ignore-command-error treat non-zero exit codes of children as
error
-O, --to-stdout extract files to standard output
--to-command=COMMAND pipe extracted files to another program
Handling of file attributes:
--atime-preserve[=METHOD] preserve access times on dumped files, either
by restoring the times after reading
(METHOD='replace'; default) or by not setting the
times in the first place (METHOD='system')
--clamp-mtime only set time when the file is more recent than
what was given with --mtime
--delay-directory-restore delay setting modification times and
permissions of extracted directories until the end
of extraction
--group=NAME force NAME as group for added files
--group-map=FILE use FILE to map file owner GIDs and names
--mode=CHANGES force (symbolic) mode CHANGES for added files
--mtime=DATE-OR-FILE set mtime for added files from DATE-OR-FILE
-m, --touch don't extract file modified time
--no-delay-directory-restore
cancel the effect of --delay-directory-restore
option
--no-same-owner extract files as yourself (default for ordinary
users)
--no-same-permissions apply the user's umask when extracting permissions
from the archive (default for ordinary users)
--numeric-owner always use numbers for user/group names
--owner=NAME force NAME as owner for added files
--owner-map=FILE use FILE to map file owner UIDs and names
-p, --preserve-permissions, --same-permissions
extract information about file permissions
(default for superuser)
--same-owner try extracting files with the same ownership as
exists in the archive (default for superuser)
--sort=ORDER directory sorting order: none (default), name or
inode
-s, --preserve-order, --same-order
member arguments are listed in the same order as
the files in the archive
Handling of extended file attributes:
--acls Enable the POSIX ACLs support
--no-acls Disable the POSIX ACLs support
--no-selinux Disable the SELinux context support
--no-xattrs Disable extended attributes support
--selinux Enable the SELinux context support
--xattrs Enable extended attributes support
--xattrs-exclude=MASK specify the exclude pattern for xattr keys
--xattrs-include=MASK specify the include pattern for xattr keys
Device selection and switching:
--force-local archive file is local even if it has a colon
-f, --file=ARCHIVE use archive file or device ARCHIVE
-F, --info-script=NAME, --new-volume-script=NAME
run script at end of each tape (implies -M)
-L, --tape-length=NUMBER change tape after writing NUMBER x 1024 bytes
-M, --multi-volume create/list/extract multi-volume archive
--rmt-command=COMMAND use given rmt COMMAND instead of rmt
--rsh-command=COMMAND use remote COMMAND instead of rsh
--volno-file=FILE use/update the volume number in FILE
Device blocking:
-b, --blocking-factor=BLOCKS BLOCKS x 512 bytes per record
-B, --read-full-records reblock as we read (for 4.2BSD pipes)
-i, --ignore-zeros ignore zeroed blocks in archive (means EOF)
--record-size=NUMBER NUMBER of bytes per record, multiple of 512
Archive format selection:
-H, --format=FORMAT create archive of the given format
FORMAT is one of the following:
gnu GNU tar 1.13.x format
oldgnu GNU format as per tar <= 1.12
pax POSIX 1003.1-2001 (pax) format
posix same as pax
ustar POSIX 1003.1-1988 (ustar) format
v7 old V7 tar format
--old-archive, --portability
same as --format=v7
--pax-option=keyword[[:]=value][,keyword[[:]=value]]...
control pax keywords
--posix same as --format=posix
-V, --label=TEXT create archive with volume name TEXT; at
list/extract time, use TEXT as a globbing pattern
for volume name
Compression options:
-a, --auto-compress use archive suffix to determine the compression
program
-I, --use-compress-program=PROG
filter through PROG (must accept -d)
-j, --bzip2 filter the archive through bzip2
-J, --xz filter the archive through xz
--lzip filter the archive through lzip
--lzma filter the archive through lzma
--lzop filter the archive through lzop
--no-auto-compress do not use archive suffix to determine the
compression program
--zstd filter the archive through zstd
-z, --gzip, --gunzip, --ungzip filter the archive through gzip
-Z, --compress, --uncompress filter the archive through compress
Local file selection:
--backup[=CONTROL] backup before removal, choose version CONTROL
--hard-dereference follow hard links; archive and dump the files they
refer to
-h, --dereference follow symlinks; archive and dump the files they
point to
-K, --starting-file=MEMBER-NAME
begin at member MEMBER-NAME when reading the
archive
--newer-mtime=DATE compare date and time when data changed only
-N, --newer=DATE-OR-FILE, --after-date=DATE-OR-FILE
only store files newer than DATE-OR-FILE
--one-file-system stay in local file system when creating archive
-P, --absolute-names don't strip leading '/'s from file names
--suffix=STRING backup before removal, override usual suffix ('~'
unless overridden by environment variable
SIMPLE_BACKUP_SUFFIX)
File name transformations:
--strip-components=NUMBER strip NUMBER leading components from file
names on extraction
--transform=EXPRESSION, --xform=EXPRESSION
use sed replace EXPRESSION to transform file
names
Informative output:
--checkpoint[=NUMBER] display progress messages every NUMBERth record
(default 10)
--checkpoint-action=ACTION execute ACTION on each checkpoint
--full-time print file time to its full resolution
--index-file=FILE send verbose output to FILE
-l, --check-links print a message if not all links are dumped
--no-quote-chars=STRING disable quoting for characters from STRING
--quote-chars=STRING additionally quote characters from STRING
--quoting-style=STYLE set name quoting style; see below for valid STYLE
values
-R, --block-number show block number within archive with each message
--show-defaults show tar defaults
--show-omitted-dirs when listing or extracting, list each directory
that does not match search criteria
--show-snapshot-field-ranges
show valid ranges for snapshot-file fields
--show-transformed-names, --show-stored-names
show file or archive names after transformation
--totals[=SIGNAL] print total bytes after processing the archive;
with an argument - print total bytes when this
SIGNAL is delivered; Allowed signals are: SIGHUP,
SIGQUIT, SIGINT, SIGUSR1 and SIGUSR2; the names
without SIG prefix are also accepted
--utc print file modification times in UTC
-v, --verbose verbosely list files processed
--warning=KEYWORD warning control
-w, --interactive, --confirmation
ask for confirmation for every action
Compatibility options:
-o when creating, same as --old-archive; when
extracting, same as --no-same-owner
Other options:
-?, --help give this help list
--restrict disable use of some potentially harmful options
--usage give a short usage message
--version print program version
Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.
The backup suffix is '~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX.
The version control may be set with --backup or VERSION_CONTROL, values are:
none, off never make backups
t, numbered make numbered backups
nil, existing numbered if numbered backups exist, simple otherwise
never, simple always make simple backups
Valid arguments for the --quoting-style option are:
literal
shell
shell-always
shell-escape
shell-escape-always
c
c-maybe
escape
locale
clocale
*This* tar defaults to:
--format=gnu -f- -b20 --quoting-style=escape
--rmt-command=/data/data/com.termux/files/usr/libexec/rmt
You see the difference...
Download Termux here.
Open it and first of all run pkg update

Categories

Resources