yashsingh1/xdaforums huggingface dataset:
[OnePlus 11] WoKoschekk:
What TWRP does: Create an archive of /data with tar, but exclude /data/media. It looks like this in Termux:

tar -cv --exclude='media/*' --file=/storage/$EXT/data.ext4.win000 /data

This saves the backup on an external sd. You can change it to

tar -cv --exclude='media/*' --file=/data/media/0/data.ext4.win000 /data

for saving the backup in your internal storage.
[OnePlus 11] m0d hipp¥:
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:

adb exec-out "su -c dd if=/dev/block/bootdevice/by-name/userdata && tar -cz -p --exclude='media*' --exclude='*-cache' /sdcard/userdata.tar"
[OnePlus 11] WoKoschekk:
it's also possible to split the archive in several parts:

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.
[OnePlus 11] WoKoschekk:
please wait, it's a bit more complicated
[OnePlus 11] WoKoschekk:
do you have a TWRP backup of any phone?
[OnePlus 11] m0d hipp¥:
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!
[OnePlus 11] MrSteelX:
The 9 pro has twrp and it works on oos13 too.
[OnePlus 11] WoKoschekk:
Ok, here is a part of the recovery.log by TWRP. It starts with the beginning of a backup of /data:

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!
[OnePlus 11] WoKoschekk:
I edited the Termux output for tar.
[OnePlus 11] m0d hipp¥:
ok I installed termux and ran pkg update to update all modules.
[OnePlus 11] WoKoschekk:
do you understand the "internal storage - /sdcard"-thing and why to exclude it?

It should also be possible to run Termux via ADB. Give me a few minutes to figure it out how to do it.
[OnePlus 11] m0d hipp¥:
Yes I understand it. basically you can't backup to it while it's in use. so it needs to be excluded. So since these are all the same paths "/data/media = /storage/emulated/0 = /sdcard", would it be enough to just exclude "/media*" or would you need to exclude "/data/media*", and "/storage/emulated/0*", and "/sdcard*"

Thanks!
[OnePlus 11] WoKoschekk:
exclude just /media as in the given command.

To use Termux via ADB:

adb shell
su #Magisk prompts you to grant root access for shell
PATH=/data/data/com.termux/files/usr/bin
SHELL=/data/data/com.termux/files/usr/bin/sh
[OnePlus 11] WoKoschekk:
Open Termux on your phone and run 'pkg install tsu' to install 'Termux su'. After that and after 'SHELL=/data...' you can run 'tsu'. That then brings you in a clean way into the Termux shell.
[OnePlus 11] m0d hipp¥:
I'll try these commands and see if I can get it. Basically I would use this command right?

tar -cv --exclude='media/*' --exclude='*-cache' --file=/data/media/0/data.ext4.win000 /data
[OnePlus 11] WoKoschekk:
why did you add --exclude='*-cache'? This would exclude /data/dalvik-cache since there's no other path with '-cache' on /data.
[OnePlus 11] m0d hipp¥:
I added the cache because I came across this post: https://github.com/dlenski/tetherback That dev made a comment that for twrp backup for the data mount point

So I thought to include that as well.
[OnePlus 11] WoKoschekk:
This was meant to be for Nexus 5 and a directory called data-cache. I assume it's an app cache but it's not used anymore on modern Android devices. Instead of this the option you add won't save ~/dalvik-cache. In general that's not an issue and on first boot the system will recreate the files. But it takes a few minutes and you could skip the waiting time by not excluding it.

I noticed that the guy uses --exclude='media*' while I used --exclude='media/*'.

Forget them both!

Let's pretend your partition stores

/data/mediafile
/data/media/0

BTW: In a previous post I said that /data/media = /storage/emulated/0 what is indeed /data/media/0 = /storage/emulated/0. I forgot the folder '0' that is specific to the user. You are user_0 and every new one will be created ongoing as user_1, ..., user_n.

To get to the point, the following explains the different arguments for --excluding:

# excluding 'media/*' saves:
/data/
/data/media
/data/mediafile

=> /data/media/0 is excluded

# excluding 'media*' saves:
/data/

=> all folders and also ALL FILES beginning with 'media' are excluded what is NOT desired!

# excluding 'media' saves:
/data/
/data/mediafile

=> this is the best practice and I would
recommend you to use this argument.
the folder ~/media/0 gets created on first boot by
the system. So, you don't need to save
/data/media with your backup. but apart from
that this argument will save all files beginning
with 'media'.

f.y.i. I haven't tested yet to restore a backup like this! I was searching for a method to create a TWRP backup manually. The command is able to do it 1:1 and a hexdump of the first lines is identical. But it can only be used in running system. I have got no idea what will happen if it's being restored.
[OnePlus 11] m0d hipp¥:
Thanks for the explanation and clarifying everything. I had a chance to test this out and here are my results.

I created 2 small scripts

batch script

@echo off
cls

pushd "%~dp0"

adb shell su <test.txt

Pause

test.txt

cd "/data/data/com.termux/files/usr/bin"
tar -cv --exclude='media' --file=/data/media/0/data.ext4.win000 /data

It took less than 1 minute to run which is pretty fast. It saved the "data.ext4.win000" data file and it shows 20Gb, however the last line in the output of the batch file states "tar: had errors". Is there a way I can see what the errors are?
[OnePlus 11] WoKoschekk:
did you grant root permissions to "shell"?

The line »cd "/data/data/com.termux/files/usr/bin"« is useless in your case.
[OnePlus 11] m0d hipp¥:
the su is in the batch script. I tested it out by the command "whoami" and it returned root.

As far as the cd command, I thought that the tar file in termux is different than the standard tar issued with Android, so I was under the impression I had to cd to the bin file and execute the tar commands from there. Am I mistaken?
[OnePlus 11] WoKoschekk:
yes, you are in SHELL=/system/bin/sh and therefore /system/bin/tar will be used by the system. That's why I told you to change the shell variables PATH= and SHELL=.

Instead of changing the shell environment you can also execute the binary in a current path you are in with

./tar

or from outside that path with /data/data/com.termux/files/usr/bin/./tar

For me this method seems to be a bit tricky and could lead to confusion if you forget the prefixed "./" To get around this I told you to change the environment.

So, test.txt should look like this:

cd "/data/data/com.termux/files/usr/bin"
./tar -cv --exclude='media' --file=/data/media/0/data.ext4.win000 /data

add a prefixed ./ to tar and you needn't to change the environment. But remember that for some up coming changes in your script!
[OnePlus 11] m0d hipp¥:
Sorry I totally missed the part on how to set environmental variables. I just did that now. I'll give my script another go.

By the way, when I set the path and shell variables is that only within the current session or is it permanent now any time I use ADB?

EDIT:

So I think the variables are only within the current session.

Anyway After setting the paths I reran the command

tar -cv --exclude='media' --file=/data/media/0/data.ext4.win000 /data

I see everything processing with the verbose output.

This time it ran with no errors, but it shows it's only 50mb. That can't be right.
[OnePlus 11] m0d hipp¥:
There was an error with my syntax. I got it now. It shows 20Gb and no errors.
[OnePlus 11] WoKoschekk:
These variables are only set for the current session like any other variables you declare in a script. You can call the value with echo $PATH or echo $SHELL or all values with set.
[OnePlus 11] WoKoschekk:
instead of changing the variables you can also execute

/data/data/com.termux/files/usr/bin/./tsu

tsu = Termux su-shell, pkg install tsu

then you are also using the Termux shell as root.
[OnePlus 11] WoKoschekk:
Rename data.ext4.win000 to data.ext4.win000.tar and it's readable and can be opened with any archiver software like WinRAR or 7z on Android/Windows. That's the easiest way to check the archive for errors/missing files.
[OnePlus 11] m0d hipp¥:
I still seem to be getting mixed results. sometimes I get a 20Gb backup other times it's only 50mb. I don't get any errors, but when I open up the 50mb archive I see several directories missing even though it processed without any errors. for example the 50mb file these are the directories within root that it backed up.

anr
bootchart
misc
tombstones
unencrypted
vendor
vendor_ce
vendor_de
[OnePlus 11] WoKoschekk:
Paths like /app, /data or /system are missing. I have no solution for that. But just try it without ADB and use Termux directly on your phone. Install the package tsu and execute your command tar -cv ...
[OnePlus 11] WoKoschekk:
your output is verbose and any errors should be stated in your output
[OnePlus 11] m0d hipp¥:
So this is really weird, but when I go to /data/media/0 I see a tar file in there but it's only 1024 b, now when I navigate to "/storage/emulated/0" the tar file there is 20Gb. Why is there a inconsistency there when they essentially point to the same path?
[OnePlus 11] WoKoschekk:
What's inside the archive??
[OnePlus 11] m0d hipp¥:
I need to do more test runs, but I think a part of it could be that I had aps running in the background that may have been causing conflict. It's still unknown to me, because as you mentioned above with the verbose output everything shows that it goes through with no errors. And the weird thing is in my file explorer it shows the file as either 50mb or 1024b, and regardless when I use a storage sniffer app it shows the same thing, but the system sees it as 20Gb. It's hard to explain, but I'll try to take a picture when it happens again.
[OnePlus 11] Marchcat2008:
Pay attention to this project. Maybe the information will be useful: https://github.com/ziandzivan

I made a full backup on my Oneplus 11, but I never restored from it. Be afraid to take risks.
[OnePlus 11] Whark:
Greetings. Question for you or anyone who might see this and want to help: I have a not-yet-rooted OnePlus 8 Pro that I want to back up. Problem is, most of the backup apps or options backup the typical (and I guess most popular) categories like contacts, call logs, messages, notes, pictures, audio, video, applications. That's all well and good, but I want to also back up my apps' DATA so I won't lose anything and won't have to reconfigure app by app.

My intent is to factory-reset my phone and start from scratch. Yes I have most things backing up to Google/GDrive so I can restore from there and I have done a full copy and paste backup directly from my phone (mounted as a drive on Windows 10) to my PC.

The OnePlus Clone Phone app does NOT backup app DATA. I've used TWRP and adb before but it's been a while and would have no clue on how to use Termux as discussed previously.

You may be asking why I would want or need to do that. Well, phone is healthy and has no malware or viruses, but some entries on the Recent Apps screen are intermittently flashing for no reason. AND, my phone seems to get and run very HOT when I use it or charge it. :( I am hoping to solve those problems by NOT reinstalling all the apps I currently have.

Any suggestions on what app/s or method/s to use for a full backup WITH app DATA to ensure I don't lose anything important when I factory reset? I thank you in advance for any assistance you can offer!
[OnePlus 11] birdie:
It did for me for over 50 apps (which do not use Google backup, mind you). Only a couple weren't backed up.
[OnePlus 11] Whark:
Ok then. Thank you for that insight. My next hurdle is that I want it to backup to my PC because I don't have another phone to back it up to like the process seems to require and I don't see an option to backup to PC. :(

Do you know of any way to do this? Any additional help is most appreciated!
[OnePlus 11] birdie:
TBO I've got the same question. I don't know how it can be done without an extra OnePlus smartphone :-(

I was thinking about installing the app in Android x86 running in a virtual machine but the app seemingly requires an actual WiFi connection to work which Android x86 doesn't have AFAIK. Perhaps it could work via LAN, you could give it a try - I'm too lazy :)
[OnePlus 11] rmedure:
I currently have a OnePlus 10 Pro which seems to have no hope in site for a custom recovery. This thread really got me on the right track for alternate way to create a full userdata backup.

I managed to get this working and automated with just a few lines of code. In windows 10, I am running the following simple batch file successfully:

@echo off
REM change working directory for tar file pull
cd /d "D:\Mobile Phone\ADBBackup"

echo Run as administrator not required
echo Connect phone with USB cable
pause
echo.

REM tar usage
REM -, default file
REM c, create
REM v, verbose
REM z, gzip
REM file=/data/media/0/... results in incomplete tar
REM file=/storage/emulated/0/... works
REM file=/mnt/sdcard/... works
REM file=/sdcard/... works

REM single tar file
REM adb shell "su -c tar cvz --exclude='media/0/backup' --exclude='media/0/NeoBackup' --exclude='*-cache' --file=/sdcard/backup/data.ext4.win000 /data"

REM split tar files
adb shell "su -c tar -cz --exclude='media/0/backup' --exclude='media/0/NeoBackup' --exclude='*-cache' /data | split -b 4096m - /sdcard/backup/data.ext4.win_"

REM pull tar file(s) and delete unencrypted backup data in sdcard folder
for /f "delims=" %%G in ('adb shell find /sdcard/backup/data.ext4.*') do (
adb pull -a "%%G"
adb shell rm "%%G"
)

This gets the entire /data directory, excludes the backup folder, splits the tar into 4GB size files (or one large file), copies to windows machine, and deletes from phone. My tar version is 'toybox 0.8.9-android'; I think this matters for proper tar syntax, especially for --exclude feature.

It seems that 'verify' is not available in my tar version. But, I can open the the tar file (or first split tar file) on the windows machine using 7z, and it unpacks all of them, opens the entire archive, and the entire directory can be browsed. I expect successful unpack and open is an indication of no corruption.

While the tar is running, I get a ton of "tar: unknown file type '140000" messages; that arise with the redirect to split. It does not seem to affect the integrity of the tar file at all though.

Now, to think about how to restore if/when necessary! :) I'm not too concerned about it tho since I have an easily browsable full backup.

Hopefully this helps some folks.

Cheers!
[OnePlus 11] Appreciative:
If anyone here wants to help explore, this idea could potentially allow us to take partition backups without root. Many possibilities. Pulling boot images, persist partitions, dumping entire device, dumping partition before and after updates to diff and see what's changed for further development and so on. For possibly every device we can get the firehose loader from, I'm not sure if the Digests files will work on anything.

I can see the partitions (boot, vbmeta, persist etc) are being touched in logs after readback but not sure how they're packaged yet, or if they're ignored for copying without parameters set. Clearly this tool does have the ability to copy them tho, more work is needed. It would be like msm+F8 for op9 and earlier, but for 11, potentially 10/12/fold etc

Kind of a long winded explanation and findings here: https://xdaforums.com/t/oppo-read-back-tool-how-do-we-make-this-work-for-us-old-msm-style.4658040/
[OnePlus 11] wfred:
Try Swift backup
[Android Software/Hacking General [Developers Only]] iVIERMA:
Hi, I'm trying to unlock the bootloader of my phone ( Vivo y33s ), I have installed the drivers and used the Vivo fastboot tool to unlock it, but when i try to unlock it, it just days : " < Waiting for device > ".

I Have tried every single driver but hasn't worked, also when i use normal fastboot it sees the device, can anybody help? Also sorry for bad English
[Android Head-Units] cnwscion:
Hello friends. After scouring the forum here and the interwebs in general, I'm at a loss for any information on a custom rom for my generic xyauto headunit.

Android: B9212A_AHD_00017_V001

Android os: Android 12.0

CAR AUDIO: B7.3.7 (X2)

CAN Pro: no canbus-V2.24.0-disconnect (adding canbus soon)

FLASH: 32G

DDR: 2G

cpu: A7 1.5GHzx4

display: 768*1024(lvds)(6 bits)

MCU: 4.2 (X2)

I have the latest firmware from xyauto and an custom launcher, but I really want to root the thing and add a custom ROM, something like this:

[GUIDE] Android 6 SUPERMOD for YT9213AJ, YT9216B, YT9217B, YT9218CH - root, Viper4Android, TWRP, custom UI, brick recovery and more

Hi all, If you want to greatly improve the way your head unit works, sounds and looks like - you've come to the right place! Why install this? With any of these packages you will greatly improve: Stability Speed User Interface Sound tweaking...

xdaforums.com

Any thoughts or information is really appreciated!
[P8lite Q&A, Help & Troubleshooting] La_Forge:
Hey folks,

I was trying to do a full backup of the stock rom before flashing a new rom, but I am getting this error:

Unable to locate '/boot' partition for backup calculations.

Does anyone know why TWRP does not list the boot partition?

I am currently running twrp-3.7.0_9-0-prague.img.

I have also tried twrp-3.5.2_9-0-prague.img, but same issue.

Thanks in advance
[Android General] Moogle:
I see that there's been some small progress getting custom ROM's working now on the Lenovo A7600-H version. I only dip back into XDA every few years which means relearning the latest tools and techniques, which also means I end up with lots of questions. I figured I'd create this seperate thread for others like me. Most of the updated techniques are located in the following threads:

https://xdaforums.com/t/rom-7-1-2-unofficial-aim-os-v2-5-for-lenovo-a7600-f-mt6582-port.3713308/

https://www.savagemessiahzine.com/sec__/forum/index.php?showtopic=724424

{Mod edit: Link removed. Oswald Boelcke, Senior Moderator}

But there's still not concise clear instructions on how to reflash the A7600-H versus the A7600-F, they're a bit mashed up so I'm hoping we can get a seperate thread going with instructions for those of us still stuck with this device and desperate for some help.

If @SaberShip could chime in here with the other procedure that would help a lot too.
[Android General] Oswald Boelcke:
@Moogle I've moved your thread from the development forum, for which it doesn't qualify, to Android General. You can retrieve the exact reasons for this movement from all the moderator announcements and guidances stuck at the top of this forum that we expected you to read prior to posting:

Miscellaneous Android Development

For ROMs, kernels, tools and scripts only (devices that do not have a forum on XDA)

xdaforums.com

Additionally, I've removed the link to 4pda from your post! 4pda is not only another phone related website (and not at all affiliated with xda-developers) but also well known for the distribution of malware and warez. Links or references to 4pda are not accepted on XDA at all.

XDA Forum Rules (excerpt):

Please refrain from sharing of such links or references in future! Thanks for your cooperation!

Regards

Oswald Boelcke

Senior Moderator
[Android General] Moogle:
wow XDA has really gone downhill.
[Xiaomi Poco F5 / Redmi Note 12 Turbo (China)] Cyrus Yip:
Redmi Note 12 Turbo has built-in Google Services. We just need to install Google Play.

Turn on Google Services: Settings -> Account & sync -> Basic Google Services

Install Google Play: search “google play” on GetApps and update “Google Play Store”. If Google Play isn’t found on GetApps, install it from Aptoide.

Now you should find Play Store on the home screen.

Original post: How to Install Google Play On Xiaomi Phones / Redmi Phones / MIUI China
[Xiaomi Poco F5 / Redmi Note 12 Turbo (China)] immns:
can we just install global poco f5 rom in fastboot?
[Xiaomi Poco F5 / Redmi Note 12 Turbo (China)] Cyrus Yip:
Not sure if that works. This guide was written for people who enjoy using China rom and people who are stuck in the China rom because they are waiting for unlocking the bootloader.
[Touch Diamond, MDA Compact IV General] futty:
what do i need to play avi, mpg, wmv or mpg files copied from the computer to the diamond? Ive looked and seems people recommend "TCPMP" cause it plays everything but whe i installed it and tried to run it, it crashes
[Touch Diamond, MDA Compact IV General] Sergio PC:
Try coreplayer, it kicks ass.
[Touch Diamond, MDA Compact IV General] futty:
last time i checked you needed to buy that but maybe there is a trial version and what about codecs? the ones for coreplayer off their site you needed to buy too :confused::mad:
[Samsung Galaxy S21 Ultra] killerscript:
A month ago I've updated my S21.

Since then, I'm unable to transfer data from my mobile to PC, AND can't connect my phone to Android Auto in my car multimedia

I tried different cables, ALL original ones but still same error:

View attachment 5927077.
[Samsung Galaxy S21 Ultra] Immortal68:
Have you cleaned the USB port? You can do it with pressurized air.
[Android General] mvikrant97:
I will be using a paid software to unlock bootloader on your Xiaomi Mediatek

Device but for the XDA community it is absolutely free.

This tool uses the mtk client exploit to unlock bootloader without any wait

times so big thanks to the mtk client exploit developer team and others.

The below list is not exhaustive and can be used on any MTK based phone

given that the software supports it.

Warnings:

1. Always backup your device before you unlock it.

2. You would be responsible for outcomes due to failed bootloader unlocking.

3. PLEASE DO NOT REQUEST HERE FOR QUALCOMM BASED [Xiaomi] DEVICES or

any other manufacturer.

Please comment down your exact model number and device codename.

YOUR DEVICE MUST SHOW AS MTK USB PORT IN DEVICE MANAGER.

Requirements:

MTK USB DRIVERS

LIB USB FILTER

Xiaomi MediaTek

- List of Supported Models :

- Redmi Note 11 Pro [ pissarro ]

- Redmi Note 11 Pro+ [ pissarro ]

- Redmi Note 11 Pro 4G [ viva ]

- Redmi K40 Gaming [ ares ]

- POCO F3 GT [ ares ]

- Redmi Note 11E [ light ]

- Redmi Note 11R [ light ]

- Redmi 11 Prime 5G [ light ]

- Redmi 10 5G [ light ]

- POCO M4 5G [ light ] [thunder]

View attachment 5927107

​
[Android General] MDo94:
Redmi Note 11 Pro+ 5G

Model: 21091116UG

Codename : pissarropro
[Android General] mvikrant97:
Please download and install MTK Drivers and LIB USB from the above post so that your phone can be connected in BROM mode to your computer.

Also download TeamViewer or Anydesk so that I can unlock your phone's Bootloader.

Please don't share your TeamViewer or Anydesk ID here in the comments, you can PM me the ID.
[Android General] elmor67:
Marketname: Redmi Note 12 Pro+ 5G

Codename: rubypro

Model name: 22101316UG

Its not ruby but i m flashing same firmware, i backuped all partitions, we will tray unlock proccess, please contact to telegram, my name enigmaticq
[Android General] elmor67:
Marketname: Redmi Note 12 Pro+ 5G

Codename: rubypro

Model name: 22101316UG

Its not ruby but i m flashing same firmware, i backuped all partitions, we will tray now unlock proccess, please send pm or contact to telegram, my name enigmaticq
[Android General] EACUAMBA:
Hi brother, how are you doing?

I have the same version like yours, but my phone don't have baseband, can you please share you Partitions backup, maybe I can manage to recover it.
[Android General] RickGamer04:
Redmi Note 12 Pro 5G

Model: 22101316G