- Как создать полный бэкап телефона Android без рут
- Установка Android SDK
- Подготовка устройства
- Проверка ADB
- Как создать полный бэкап телефона Android без рут
- Восстановление резервной копии
- AnatomicJC / android-backup-apk-and-datas.md
- This comment has been minimized.
- natevw commented Mar 13, 2021
- This comment has been minimized.
- davtur19 commented May 17, 2021
- This comment has been minimized.
- jrd commented Jun 22, 2021
- This comment has been minimized.
- thebigsmileXD commented Aug 14, 2021
- This comment has been minimized.
- ToniCipriani commented Sep 21, 2021
- This comment has been minimized.
- GuruGoat commented Sep 25, 2021
- This comment has been minimized.
- berkes commented Nov 10, 2021
- This comment has been minimized.
- osamh757955 commented Nov 12, 2021
- This comment has been minimized.
- forianzsiga commented Nov 15, 2021 •
- This comment has been minimized.
- osamh757955 commented Nov 15, 2021
- This comment has been minimized.
- thebigsmileXD commented Nov 15, 2021
- This comment has been minimized.
- osamh757955 commented Nov 15, 2021
- Android Manifest merge conflict (backup rules) #9
- Comments
- ljwan12 commented Jan 14, 2020
- ljwan12 commented Jan 14, 2020
- elitvynov commented Apr 23, 2020
- elitvynov commented Apr 28, 2020
- syrakozz commented May 3, 2020
- Cotel commented May 8, 2020
- ManakaMichihito commented May 14, 2020
- lfg-ryan commented May 14, 2020
- ManakaMichihito commented May 21, 2020
- ManakaMichihito commented May 22, 2020 •
- VladimirKuzmin-azur commented Jul 14, 2020 •
- m-kul commented Jan 8, 2021
- af-vs commented Jan 14, 2021
Как создать полный бэкап телефона Android без рут
Android включает встроенную функцию, чтобы создать полный бэкап телефона Android без рут прав, а также средство для его восстановления. Все что Вам потребуется — это компьютер и устройство на ОС Android 4.0 (Ice Cream Sandwich).
Вы также можете создать и восстановить резервную копию Вашего Android устройства с помощью утилиты Titanium Backup. Titanium Backup это, пожалуй, одно из самых лучших решений для бэкапа, но оно требует рут права.
Установка Android SDK
Для создания и восстановления резервной копии будем использовать команды ADB (Android Debug Bridge). Эта утилита включена в Google Android SDK, который Вы можете загрузить бесплатно.
Для начала Вам необходимо установить Java Development Kit (если не установлен), так как Android SDK требует ее наличия. Загрузите и установите 32-битную версию Java Development Kit (Android SDK требует 32-битную версию, даже если у Вас установлена 64-битная версия Windows).
Далее загрузите и установите Android SDK. Если SDK говорит, что не может найти Java, то, возможно, Вы установили 64-битную версию, в этом случае установите 32-битную.
После того, как Вы успешно установили SDK, запустите Android SDK Manager из меню Пуск. Поставьте галочку напротив Android SDK Platform-tools и нажмите кнопку установки, чтобы установить пакет инструментов для платформы, который содержит ADB. Если Вы увидите ошибку, то запустите SDK Manager от имени Администратора (нажмите на иконку SDK Manager в меню Пуск и выберите «Запустить от имени Администратора»).
Подготовка устройства
Вы должны включить отладку по USB на своем устройстве. Вы можете сделать это из инструментов разработчика в настройках Android.
Теперь соедините ПК и свое устройство по USB кабелю. У Вас должны быть установлены драйвера для Вашего смартфона, обычно их можно скачать с сайта производителя. Установите Google USB Driver через Android SDK Manager(подпапка Extras), возможно, это сработает.
Проверка ADB
Запомните путь, где установлен Android SDK. Он отображается в самом верху окна Android SDK Manager рядом с надписью SDK Path.
Вам надо найти файл adb.exe в папке platform-tools. Обычно он находится по пути C:\Users\NAME\AppData\Local\Android\Android-sdk\platform-tools.
Перейдите в эту папку и, зажав кнопку Shift, нажмите правой кнопкой мыши на свободном месте, в открывшемся контекстном меню выберите «Открыть окно команд». Чтобы проверить соединение adb с Вашим устройством выполните команду adb devices .
В списке должно отобразиться Ваше устройство. Если его нет, значит драйвер установлен неправильно.
Как создать полный бэкап телефона Android без рут
Теперь Вы можете воспользоваться командами adb для создания резервной копии файлов Вашего устройства. Для полного бэкапа выполните следующую команду:
adb backup -apk -shared -all -f C:\Users\NAME\backup.ab
Команда создаст резервную копию всех установленных приложений (apk файлы) и данных на SD карте в файл C:\Users\NAME\backup.ab на вашем компьютере. Замените NAME в команде на имя пользователя Вашего компьютера или укажите другое расположение.
При выполнении команды на телефоне необходимо подтвердить создание резервной копии. Вы также можете защитить резервную копию паролем.
В зависимости от количества данных процесс может занять некоторое время.
Восстановление резервной копии
Для восстановления резервной копии необходимо выполнить следующую команду:
adb restore C:\Users\NAME\backup.ab
Появится подтверждение, которое содержит информацию о том, что резервная копия заменит все данные на устройстве. Если на бэкап установлен пароль, то необходимо будет ввести его.
Чтобы создать полный бэкап телефона Android без рут прав надо быть средним пользователем, который понимает особенность Android, но с помощью нашей инструкции это сможет сделать и новичок. Надеемся, что эта функция будет доступна в интерфейсе Android в будущем.
Источник
AnatomicJC / android-backup-apk-and-datas.md
Backup android app, data included, no root needed, with adb
adb is the Android CLI tool with which you can interact with your android device, from your PC
You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.
Fetch application APK
To get the list of your installed applications:
If you want to fetch all apk of your installed apps:
To fetch only one application, based of listed packages results:
Backup applications datas
To backup one application, with its apk:
To backup all datas at once:
To backup all datas in separated files:
First, you have to install the saved apk with adb:
Then restore the datas:
Extract content of adb backup file
You will need the zlib-flate binary. You will able to use it by installing the qpdf package.
Then, to extract your application backup:
Miscellaneous: remove non-wanted applications
Sometimes, you have already installed (but non wanted) apps when you buy an Android Smartphone. And you can’t uninstall these apps. So Bad. And some pre-installed app are not present on PlayStore. WTF.
You can remove them with this command, and root is not needed:
You can first disable them, then when you are sure, you can remove them.
To list disabled apps:
This comment has been minimized.
Copy link Quote reply
natevw commented Mar 13, 2021
For other platforms there’s some zlib alternatives in the thread here. E.g.:
This comment has been minimized.
Copy link Quote reply
davtur19 commented May 17, 2021
For those using adb on Windows with bash
This comment has been minimized.
Copy link Quote reply
jrd commented Jun 22, 2021
pm list packages could be replaced by cmd package list packages as the pm list is a deprecated alias and can go away at any version.
This comment has been minimized.
Copy link Quote reply
thebigsmileXD commented Aug 14, 2021
To back up your SD card or any other folder to a tar file, you can do
adb exec-out «cd /storage/sdcard0 && tar c * -» > sdcard.tar
where adb pull might fail due to the target file system not supporting case-sensitive file names etc.
This comment has been minimized.
Copy link Quote reply
ToniCipriani commented Sep 21, 2021
Powershell for individual package backup:
Mind you for encrypted devices (which is almost every one out there these days) you will be prompted for a password ever single time.
This comment has been minimized.
Copy link Quote reply
GuruGoat commented Sep 25, 2021
Powershell to get all .apk.
Inspired by @ToniCipriani’s script above!
This comment has been minimized.
Copy link Quote reply
berkes commented Nov 10, 2021
If the backup file is empty, and/or the backup command exits immediately, that may be caused by running this as non-root.
First, enable «root access» for «ADB» on your devise at Settings -> System -> Developer options.
Then restart the server as root: adb root . Now the backup commands can access the data and can actually back them up.
This comment has been minimized.
Copy link Quote reply
osamh757955 commented Nov 12, 2021
Can I transfer WhatsApp Business through adb without root
Unfortunately, I haven’t been able to do it yet
This comment has been minimized.
Copy link Quote reply
forianzsiga commented Nov 15, 2021 •
actually, for newer devices (for me Android 12, unencrypted device, and without enabling password for the backup) the backup creation give me an empty file. When I changed the extension from .adb to .ab, the backup went seamlessly. It might be something version dependent, but it may be just a typo by the publisher.
This comment has been minimized.
Copy link Quote reply
osamh757955 commented Nov 15, 2021
actually, for newer devices (for me Android 12, unencrypted device, and without enabling password for the backup) the backup creation give me an empty file. When I changed the extension from .adb to .ab, the backup went seamlessly. It might be something version dependent, but it may be just a typo by the publisher.
There are no spelling errors in the text because I can transfer the official WhatsApp by adb, but I need to download the version to an old version, but WhatsApp Business cannot make a backup Is there a version of WhatsApp Business that allows me to backup
This comment has been minimized.
Copy link Quote reply
thebigsmileXD commented Nov 15, 2021
I’d prefer if this gist would stay a collection of helpful commands, and not a support forum, kthxbai
This comment has been minimized.
Copy link Quote reply
osamh757955 commented Nov 15, 2021
I’d prefer if this gist would stay a collection of helpful commands, and not a support forum, kthxbai
I want to ask more
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
Android Manifest merge conflict (backup rules) #9
Comments
ljwan12 commented Jan 14, 2020
tools:replace specified at line:20 for attribute android:fullBackupContent, but no new value specified
The text was updated successfully, but these errors were encountered:
ljwan12 commented Jan 14, 2020
|
Manifest merger failed : Attribute application@fullBackupContent value=(@xml/vungle_backup_rule) from [com.vungle:publisher-sdk-android:6.4.11] AndroidManifest.xml:19:9-60
is also present at [com.appsflyer:af-android-sdk:4.11.0] AndroidManifest.xml:14:18-73 value=(@xml/appsflyer_backup_rules).
Suggestion: add ‘tools:replace=»android:fullBackupContent»‘ to element at AndroidManifest.xml:19:5-95:19 to override.
elitvynov commented Apr 23, 2020
- What went wrong:
Execution failed for task ‘:android:processReleaseManifest’.
Manifest merger failed : Attribute application@fullBackupContent value=(@xml/vungle_backup_rule) from [com.vungle:publisher-sdk-android:6.4.11] AndroidManifest.xml:19:9-60
is also present at [com.appsflyer:af-android-sdk:4.11.0] AndroidManifest.xml:14:18-73 value=(@xml/appsflyer_backup_rules).
Suggestion: add ‘tools:replace=»android:fullBackupContent»‘ to element at AndroidManifest.xml:19:5-95:19 to override.
Did you find any solution? I have this problem too
elitvynov commented Apr 28, 2020
This is working, thank you
syrakozz commented May 3, 2020
but it takes forever while building
Cotel commented May 8, 2020
I’m having a similar issue 😢
In the main manifest allowBackup is set to false. The task is failing for a dynamic module.
ManakaMichihito commented May 14, 2020
I have the same problem.
fullBackupContent is not only used by AppsFlyer.
There is also a library that dynamically sets fullBackupContent just like AppsFlyer.
We cannot always do a manual merge.
lfg-ryan commented May 14, 2020
I have the same problem. Vungle is also using this and I can’t tell how to merge them in Unity when all of this is auto-generated stuff.
ManakaMichihito commented May 21, 2020
AppsFlyer support only answers manual merges, no matter how many times we explain it, it doesn’t fix the issue.
ManakaMichihito commented May 22, 2020 •
They don’t seem to present anything other than manually merging AndroidManifext.xml.
The answer was an inquiry to Unity technologies.
tools: replace = «android: fullBackupContent»
If there is a person to go and solve
Is required:
android:fullBackupContent=»true»
&
AppsFlyer’s FullBackup rules
(XML : full-backup-content tag)
They said:
«We have to do this in order to do the attribution and tracking accurately, if not, the reinstall will always retrieve the old install data which should be deleted.»
VladimirKuzmin-azur commented Jul 14, 2020 •
android:fullBackupContent=»@xml/appsflyer_backup_rules» tools:replace=»android:fullBackupContent
This works just fine for me. Mediation Debugger also shows that Vungle if fine. But I am little worried for Vungle backup-ing.
Could some android sensei tell if this is fine solution or not?
p.s. doing this from Unity’s main manifest
m-kul commented Jan 8, 2021
This is working, thank you
Can anybody clarify, in which manifest file we need to add this? I cannot find appsflyer’s manifest file.
af-vs commented Jan 14, 2021
We see that this issue is indeed confusing and would like to elaborate a bit extra on this matter.
TL;DR
- If you don’t wantAuto Backup — just set android:allowBackup=»false» in AndroidManifest and you are good to go
- If you wantAuto Backup — you have to:
- Manually merge backup rules from conflicting SDKs such as Vungle and AppsFlyer (there could be more) into your own XML file (e.g. @xml/merged_backup_rules ).
- Specify this file by setting 2 attributes in AndroidManifest:
- android:fullBackupContent=»@xml/merged_backup_rules» (to use your own rules)
- tools:replace=»android:fullBackupContent» (to give your rules higher priority than rules from any SDK) in AndroidManifest
Some background:
Since Android 6.0 (API level 23) Android has an Auto Backup feature that will back up the app’s data into Google Drive every now and then automatically. This is enabled by default but may cause problems to some service providers like AppsFlyer and Vungle. The reason is that we save some data into SharedPreferences which are being backed up by Android, but we don’t expect this data to retain between installs. If this data is restored after the user reinstalls the app, we may report attribution for this app incorrectly. I assume, Vungle SDK has some similar challenges.
Since AppsFlyer uses AAR to distribute the library, together with the library jar we package AndroidManifest in which we specify backup rules that are important for our SDK to function properly. Unfortunately, Android as of today doesn’t have a solid merge mechanism so in case you have 2 libraries with conflicting values for the same attribute in AndroidManifest you get different kinds of merging conflict errors.
The only solution we can see for now without harming other SDKs is to merge such conflicts manually
As a result you should have this file with merged rules:
Источник