{"id":25480524,"url":"https://github.com/xbzzzz/abpy","last_synced_at":"2025-07-27T03:06:03.519Z","repository":{"id":157543954,"uuid":"627106713","full_name":"xBZZZZ/abpy","owner":"xBZZZZ","description":"backup.ab to tar and tar to backup.ab converter python3 script ","archived":false,"fork":false,"pushed_at":"2024-08-27T16:14:24.000Z","size":39,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"m","last_synced_at":"2025-07-07T05:47:08.695Z","etag":null,"topics":["adb","adb-backup","adb-backups","android-ba","android-backup"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xBZZZZ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-12T19:50:59.000Z","updated_at":"2025-06-12T11:10:09.000Z","dependencies_parsed_at":"2024-08-27T17:43:08.886Z","dependency_job_id":"a4fc01f0-d00e-4426-a5b9-654e1737815e","html_url":"https://github.com/xBZZZZ/abpy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xBZZZZ/abpy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xBZZZZ%2Fabpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xBZZZZ%2Fabpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xBZZZZ%2Fabpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xBZZZZ%2Fabpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xBZZZZ","download_url":"https://codeload.github.com/xBZZZZ/abpy/tar.gz/refs/heads/m","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xBZZZZ%2Fabpy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267293761,"owners_count":24065321,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adb","adb-backup","adb-backups","android-ba","android-backup"],"created_at":"2025-02-18T15:53:04.446Z","updated_at":"2025-07-27T03:06:03.494Z","avatar_url":"https://github.com/xBZZZZ.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## about `adb backup`\n`adb backup` and `adb restore` are obscure (not mentioned in `adb --help`) and depracated features of `adb` but **no root needed**\n\n`adb backup` and `adb restore` commands documented [here](https://manpages.ubuntu.com/manpages/jammy/man1/adb.1.html)\n\nfile generated by `adb backup` is optionally compressed, optinally encrypted tar (pax (kinda) format (don't confuse with `pax` command)) container\n\nfiles and pax headers in tar archive need to be be in secific order and have specific names, so extracting and creating archive probably won't work (`adb restore` silently fails)\n\nyou can `u`pdate files in tar archive without extracting everything using [`7zz` (7-Zip for Linux: console version)](https://7-zip.org/download.html) [`u` command](https://7-zip.opensource.jp/chm/cmdline/commands/update.htm)\n\nhere is [help for old version of `7z.exe`](https://7-zip.opensource.jp/chm/cmdline/index.htm) but most command line options are same as `7zz`\n\n## `abpy.py` is python3 script for files generated by `adb backup`\n`abpy.py` depends on [pycryptodome](https://pypi.org/project/pycryptodome/) if using `pbkdf2engine=pycryptodome` or `aes256engine=pycryptodome`\n\n`abpy.py` depends on [pycryptodomex](https://pypi.org/project/pycryptodomex/) if using `pbkdf2engine=pycryptodomex` or `aes256engine=pycryptodomex`\n\n## example: modify `/data/data/com.gdpsedi.geometrydashsubzero/CCLocalLevels.dat` on android no root using linux computer\n\u003col\u003e\n\u003cli\u003ebackup \u003ccode\u003ecom.gdpsedi.geometrydashsubzero\u003c/code\u003e's files into \u003ccode\u003ebackup.ab\u003c/code\u003e:\u003cpre lang=\"console\"\u003e$ adb backup com.gdpsedi.geometrydashsubzero\u0026#10;WARNING: adb backup is deprecated and may be removed in a future release\u003c/pre\u003e\u003c/li\u003e\n\u003cli\u003econvert \u003ccode\u003ebackup.ab\u003c/code\u003e to \u003ccode\u003ebackup.tar\u003c/code\u003e:\u003cpre lang=\"console\"\u003e$ python3 abpy.py ab2tar if=backup.ab of=backup.tar\u003c/pre\u003e\u003c/li\u003e\n\u003cli\u003efind \u003ccode\u003eCCLocalLevels.dat\u003c/code\u003e path in \u003ca href=\"https://7-zip.opensource.jp/chm/cmdline/commands/list.htm\"\u003e\u003ccode\u003el\u003c/code\u003eist\u003c/a\u003e of files in \u003ccode\u003ebackup.tar\u003c/code\u003e:\u003cpre lang=\"console\"\u003e$ 7zz l backup.tar | grep -F CCLocalLevels.dat\u0026#10;2023-04-13 11:11:51 .....          733         1024  apps/com.gdpsedi.geometrydashsubzero/r/CCLocalLevels.dat\u003c/pre\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://7-zip.opensource.jp/chm/cmdline/commands/extract_full.htm\"\u003ee\u003ccode\u003ex\u003c/code\u003etract with full path\u003c/a\u003e \u003ccode\u003eapps/com.gdpsedi.geometrydashsubzero/r/CCLocalLevels.dat\u003c/code\u003e from \u003ccode\u003ebackup.tar\u003c/code\u003e:\u003cpre lang=\"console\"\u003e$ 7zz x backup.tar apps/com.gdpsedi.geometrydashsubzero/r/CCLocalLevels.dat\u0026#10;\u0026#10;7-Zip (z) 22.01 (x64) : Copyright (c) 1999-2022 Igor Pavlov : 2022-07-15\u0026#10; 64-bit locale=en_US.UTF-8 Threads:12, ASM\u0026#10;\u0026#10;Scanning the drive for archives:\u0026#10;1 file, 6880256 bytes (6719 KiB)\u0026#10;\u0026#10;Extracting archive: backup.tar\u0026#10;--\u0026#10;Path = backup.tar\u0026#10;Type = tar\u0026#10;Physical Size = 6880256\u0026#10;Headers Size = 14336\u0026#10;Code Page = UTF-8\u0026#10;Characteristics = POSIX PREFIX PAX path ASCII\u0026#10;\u0026#10;Everything is Ok\u0026#10;\u0026#10;Size:       733\u0026#10;Compressed: 6880256\u003c/pre\u003e\u003c/li\u003e\n\u003cli\u003eedit \u003ccode\u003eapps/com.gdpsedi.geometrydashsubzero/r/CCLocalLevels.dat\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://7-zip.opensource.jp/chm/cmdline/commands/update.htm\"\u003e\u003ccode\u003eu\u003c/code\u003epdate\u003c/a\u003e \u003ccode\u003eapps/com.gdpsedi.geometrydashsubzero/r/CCLocalLevels.dat\u003c/code\u003e to \u003ccode\u003ebackup.tar\u003c/code\u003e:\u003cpre lang=\"console\"\u003e$ 7zz u backup.tar apps/com.gdpsedi.geometrydashsubzero/r/CCLocalLevels.dat\u0026#10;\u0026#10;7-Zip (z) 22.01 (x64) : Copyright (c) 1999-2022 Igor Pavlov : 2022-07-15\u0026#10; 64-bit locale=en_US.UTF-8 Threads:12, ASM\u0026#10;\u0026#10;Open archive: backup.tar\u0026#10;--\u0026#10;Path = backup.tar\u0026#10;Type = tar\u0026#10;Physical Size = 6880256\u0026#10;Headers Size = 14336\u0026#10;Code Page = UTF-8\u0026#10;Characteristics = POSIX PREFIX PAX path ASCII\u0026#10;\u0026#10;Scanning the drive:\u0026#10;1 file, 824 bytes (1 KiB)\u0026#10;\u0026#10;Updating archive: backup.tar\u0026#10;\u0026#10;Keep old data in archive: 6 folders, 17 files, 6861172 bytes (6701 KiB)\u0026#10;Add new data to archive: 1 file, 824 bytes (1 KiB)\u0026#10;\u0026#10;    \u0026#10;Files read from disk: 1\u0026#10;Archive size: 6880256 bytes (6719 KiB)\u0026#10;Everything is Ok\u003c/pre\u003e\u003c/li\u003e\n\u003cli\u003eget info about \u003ccode\u003ebackup.ab\u003c/code\u003e:\u003cpre lang=\"console\"\u003e$ python3 abpy.py abinfo if=backup.ab\u0026#10;ver=5\u0026#10;compr\u003c/pre\u003e\u003c/li\u003e\n\u003cli\u003econvert \u003ccode\u003ebackup.tar\u003c/code\u003e to \u003ccode\u003ebackup.ab\u003c/code\u003e with that info:\u003cpre lang=\"console\"\u003e$ python3 abpy.py tar2ab if=backup.tar of=backup.ab compr ver=5\u003c/pre\u003e\u003c/li\u003e\n\u003cli\u003erestore the new \u003ccode\u003ebackup.ab\u003c/code\u003e:\u003cpre lang=\"console\"\u003e$ adb restore backup.ab\u0026#10;WARNING: adb restore is deprecated and may be removed in a future release\u0026#10;Now unlock your device and confirm the restore operation.\u003c/pre\u003e\u003c/li\u003e\n\u003c/ol\u003e\n\n## stuff I found related to `adb backup`\n* https://github.com/nelenkov/android-backup-extractor/\n* https://nelenkov.blogspot.com/2012/06/unpacking-android-backups.html\n* https://forum.xda-developers.com/t/guide-how-to-extract-create-or-edit-android-adb-backups.2011811/\n* https://sourceforge.net/projects/android-backup-processor/files/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxbzzzz%2Fabpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxbzzzz%2Fabpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxbzzzz%2Fabpy/lists"}