Since adb rarely comes up on Hacker News, I got only one shot to ask how other Android uses deal with the problem of freeing up disk space without rooting the device or doing a factory reset? The number of apps is not the problem. Some apps or the OS must be filling directories with inaccessible temporary files or perhaps the OS is keeping all its old updates somewhere? On a 32M device 15 megs is lost over the course of a year. All the obvious user space tooling cannot clear or access it.
You are aware Samsung encrypts the bootloader of their American devices, yes? If you have a way to decrypt Android 12+ Samsung bootloaders I know two separate people running unlock businesses who would love to pay you a lot of money.
Each app also has its own private storage space as well at /data/data/<package name>/ which the end user cannot access even through adb. It's owned by the Unix user representing that app and has 700 perms so the `shell` user can't access it. While you can't access the directory directly, you can clear it in Settings -> Apps -> <app> -> Storage.
Can adb show true android disk space usage without a rooted device? Either the Android system or some app is consuming half of my storage but I have no idea what or where it is. The missing storage doesn't even show up in the disk usage view and total app storage used is tiny by comparison.
I am on the latest LineageOS, and "df -h" does give me a lot of information, along with a reasonable figure for the device size under /storage/emulated.
I am using a ConnectBot local session to see this.
When I run this as root, the output of df is different, but it is not immediately obvious why.
If you can see the subdirectories, "du -sm *" will recurse and report usage by directory.
I was able to remove YouTube thanks to Canta + Shizuku. Unfortunately, the latest android OTA upgrade breaks canta. But I'm already free of YouTube and enjoying NewPipe \o/
In startup.sh, here are a few things to think about.
Instead of setting RED/GREEN/BLUE, you could do this:
N=$(printf \\033)
N="$N[" x=30
for a in Bl R G Y B M C W # Black Red Green Yellow Blue Magenta Cyan White
do eval $a='$N'"'"$(( x))"m'" \
b$a='$N'"'"$((60 + x))"m'" \
${a}bg='$N'"'"$((10 + x))"m'" \
b${a}bg='$N'"'"$((70 + x))"m'" # bX=bright Xbg=background bXbg=brgt bgnd
x=$(( x + 1 ))
done # https://en.wikipedia.org/wiki/ANSI_escape_code
Unless you have "set -e" this:
if [ ! "$HOSTNAME" ]; then
HOSTNAME="$(hostname -s)"
fi
Still trying to find a functional tool that makes it easy to take full backups and restore them to android devices since adb deprecated the "backup" command
I don't think such a thing exists right now. I've been looking for it.
The best normie backup tool is probably Neo Backup on F-Droid, and it's buggy and lacks some important features. Titanium is dead. I've not been satisfied with any of the various closed-source paid apps on the Play Store.
Any true backup is going to require rooting your phone. It's not in google's interest to allow you, the user, to access core operating system files and configuration on their device.
If you don't 0wn it, you don't own it.
Here's what I do.
I install Magisk and the MagiskSSH module. This gives me a root ssh shell and I can rsync any file on the device, selinux context and all.
The system requires some excludes for remounted/mirrored directories, and then there's other things like cache directories that I don't need to backup, so I use a rsync filter file. rsync's --link-dest makes backups very very fast and reduces disk usage. I should really do this on a filesystem that does block-level de-duplication, but I don't really need to because it's efficient enough already. Each app has to be paused/frozen during the backup to ensure data integrity.
Restoring requires a bunch of hacky scripts. It's not pretty, but it works.
I have to send over the apk file and use Android's native "pm install" to install it from /data/local/tmp. There's some cases where this doesn't work and I have to install the app manually from the store or wherever (APEX and other mutli-apk crap).
Then my script freezes/disables the app, wipes the local data, copies the backup data, fixes the ownership, unfreezes the app, and it mostly usually sometimes works.
Figuring out all the commands to do this, like getting the AIDs of apps, is some dark art shit. I've been doing this since the very beginning on a G1.
Maybe some day I'll put my scripts out there and it will inspire someone to pick it up and make them easier to use, but it's never going to be a real solution.
Someone just needs to make a real backup app for Android.
Titanium Backup has been working fine for me to backup and restore various apps. Are there features missing or problems with TB's implementation on modern Android versions?
There are very well-known problems with Titanium Backup not being able to backup/restore newer APEX and multi-part APK types. It can also cause system configuration corruption/resets on certain special/meta backup items. Google for more info.
It may not even run on some Android 13 and later devices due to a common error of not being able to detect root status.
Seedvault is not a good backup solution. The devs who promote it don't have a lot of credibility. It basically doesn't work half the time and they know it, but pretend it's great to pad their resumes.
Even the core LineageOS and Graphine devs spend time disparaging it on reddit and twitter with comments like "It's not a very good app." and "Unfortunately Seedvault is still unreliable." Those are direct quotes.
I think it was back on LineageOS 16 that it was actually broken for the entire release. It wasn't even possible to do a basic backup at all.
Google for "site:reddit.com does seedvault even work" for dozens and dozens of examples.
why pad my opinions with outdated quotes if I can have first-hand experience? it's a good tip I gave on recent developments and your objections aren't convincing. Latest Lineage/Graphene both include in their forked seedvault repos a current enough version to check out d2d-transfer, give it another try.
Seems to be tailored specifically for Apple Silicon Macs, considering that it attempts to spin up an AArch64 Docker container to compile some of its tools.
Of note of course is termux, which is a proper terminal, complete with a custom apt repo.
For cases where an adb shell is needed (modify external storage, slightly more permissions if not rooted) it's approximately possible to just copy necessary executables and .so files from termux to /data/local/tmp/ for adb (with some LD_LIBRARY_PATH & co setup), allowing running bash, htop, etc.
I'm wondering what others think about such feature (in general, not just in this specific case).
On one hand, it won't negatively affect my personal usage in anyway, probably even beneficial; On the other hand, the "purist in me" feels very uncomfortable with this kind of features (probably to the detriment of myself).
Again, this is not a complainant at all. Just find it interesting.
It's not for me. I can see the appeal of these shortcuts, but I can see it being a wtf down the road once I've forgotten that I have them in place.
Also with something like auto-correct, you have a visual affordance that alerts you to the change (with the option to override), which just happened when I misspelled 'forgotten' above. The shell doesn't have that so something just happens without any actual correction or indication the user may have made an error. Although I am not a 'fish' user, this is something that I think it does well.
I feel as though I am a dying breed, as nothing about this seems "better" than the default. The PS1 is enriched with information, sure, but I find it very distracting. I much prefer $ or #.
Do you never look at your scrollback, or a command+result pasted into a text file? I find it useful to include the context of working directory and timestamp, adjacent to the command.
I've tried it. nushell works for me only with the "-c" option, otherwise I get "Error: I/O error: Function not implemented (os error 38)". Probably the prompt function