Another trick to save a bit of memory - Gen8, Gen9, Gen10 Themes and Apps

It looks like /data/cache is mainly used by Market for storing downloads. Quite a bit of space can be taken up there. And it looks like one can just relocate that to storage (with root);
Code:
su
mkdir /storage/cache
cd /data
rm -rf cache
ln -s /mnt/storage/cache /data/cache
/data/cache won't be available for any apps that need it directly on boot, and those apps may crash, but I haven't noticed anything like that happening on my A43.
As usual with such tricks, use at your own risk and make a backup.

Related

[fixed] bootloop after moving apks to /system

I have clockwork mod, but left S-ON because I didn't feel it was important for me (plus I'm not sim-locked and didn't want to risk becoming locked to orange)
I moved a few apk files from /data/app to /system/app in recovery using adb (like maps) and deleted /data/dalvik-cache/* but now end up with repeated reboots. What have i done wrong? Can I get any logs out of the boot process?
All I can think is that I did
~ # rm /system/app/com.google.android.apps.maps-2.apk
~ # mv /data/app/com.google.android.apps.maps-1.apk /system/app
on the assumption that the one in /data took precedence and isn't incremental.
I could go back to my backup, but I'd rather understand what i've done wrong.
Edit: Seems that moving 'catch' caused the problem. Moved it back and all is fine again, with more free space on /data than I've seen for months!

[HOW-TO] Clear Dalvik Cache With Terminal

Try it out, It seems to work -- [Root Required]
All you need to do is:
-Run The Terminal and Type:
Code:
su
cd /data/dalvik-cache
rm *
exit
-Restart Your Device;
-Reboot will take a bit longer because you have cleared the cache and it has to be rebuilt.
And that's it!
TjaXanK said:
Try it out, It seems to work -- [Root Required]
All you need to do is:
-Run The Terminal and Type:
Code:
su
cd /data/dalvik-cache
rm *
exit
-Restart Your Device;
-Reboot will take a bit longer because you have cleared the cache and it has to be rebuilt.
And that's it!
Click to expand...
Click to collapse
I used something similar on my theme script:
adb shell rm /data/dalvik-cache
(And then, just in case: )
adb shell mkdir /data/dalvik-cache
Sent from my HTC Desire HD using xda premium
Quinny899 said:
I used something similar on my theme script:
adb shell rm /data/dalvik-cache
(And then, just in case: )
adb shell mkdir /data/dalvik-cache
Sent from my HTC Desire HD using xda premium
Click to expand...
Click to collapse
Ah, I didn't notice, haven't tried your theme yet
Shall I leave this post? Might be useful for someone.
TjaXanK said:
Ah, I didn't notice, haven't tried your theme yet
Shall I leave this post? Might be useful for someone.
Click to expand...
Click to collapse
Yeah, it's a nice post, leave it
Sent from my D255 using XDA App
There is no need to create dalvik-cache, if it is not present android init creates it.
Btw you may want to use rm -r -f /data/dalvik-cache
tapatalked from Archos 101 G9
TjaXanK said:
Try it out, It seems to work -- [Root Required]
All you need to do is:
-Run The Terminal and Type:
Code:
su
cd /data/dalvik-cache
rm *
exit
-Restart Your Device;
-Reboot will take a bit longer because you have cleared the cache and it has to be rebuilt.
And that's it!
Click to expand...
Click to collapse
hi
i did exactly the same but my phone is stuck with reboot logo..
its Huawei Ideos U8150-B ..
it is in reboot loop..
i did it because android was complaining low memory..
i have 4gb sd card.. and link2sd installed.. and 2 partitions on card.. ext3 and fat.. ext3 part has 900Mb free space and fat has 500 mb .. and i tried all the options in link2sd to wipe the caches but no use .. i also tried the ti backup to clear dalvik cace but it also didnt gave me a single kb .. so i tried this and now stuck at boot loop..
i have tried to boot without sd card same...
what should i do ..
i have a lot of apps and settings and dont want to loose them..
my set is rooted and aps like google play,maps,youtube etc were updated...
khankll said:
hi
i did exactly the same but my phone is stuck with reboot logo..
its Huawei Ideos U8150-B ..
it is in reboot loop..
i did it because android was complaining low memory..
i have 4gb sd card.. and link2sd installed.. and 2 partitions on card.. ext3 and fat.. ext3 part has 900Mb free space and fat has 500 mb .. and i tried all the options in link2sd to wipe the caches but no use .. i also tried the ti backup to clear dalvik cace but it also didnt gave me a single kb .. so i tried this and now stuck at boot loop..
i have tried to boot without sd card same...
what should i do ..
i have a lot of apps and settings and dont want to loose them..
my set is rooted and aps like google play,maps,youtube etc were updated...
Click to expand...
Click to collapse
Try leaving the device at the boot logo for a long time, it takes quite a long time to re-build the dalvik cache... The thing is, This tutorial is ment to be used on archos Gen9 tablets and I dont know if the dalvik cache is in the same place on your device...
TjaXanK said:
Try leaving the device at the boot logo for a long time, it takes quite a long time to re-build the dalvik cache... The thing is, This tutorial is ment to be used on archos Gen9 tablets and I dont know if the dalvik cache is in the same place on your device...
Click to expand...
Click to collapse
why don't you write it in the first post?
I know that this is such an old post..
But i need a .sh script to clean data and cache from the playstore.
Any ideas of how?

SD card location screwed after flashing ROM

Hey guys
let me give you some background informatie as to what happend
I went on a flashing spree today and I bumped into something irritating!
I've flashed JBSourcery V4.5 but it didn't satisfy my personal needs (didn't have some mods that I liked).
So back into recovery, factory reset, cache wipe... all the standard cleaning stuff. Next on my list was
LiquidSmooth and that's where my problem started. I was in recovery, wiped the lot and wanted to flash
LiquidSmooth which was already on my SDcard (I came prepared ) So I chose "Install ZIP from SD" and
my heart skipped a beat. Normally I'd see all my folders on my SD... Now I only saw "0", "Legacy" and "obb".
I kept my cool and opened each one untill I found my SD contents which where stuffed into the "0" folder.
No big deal... I could flash LiquidSmooth so everything was fine. Next one was XenonHD. Still same problem
but I could flash my stuff.
Long story short, how do I get my internal memory back to how it was?
Something on a side note though, It's only like that in recovery. If I connect my phone via USB it's normal. (Samsung Galaxy Nexus -> Internal Memory -> ...)
Ideas are welcome!
Thanks in advance! :good:
diSke
Move them with Root Explorer or hook it up to the comp and move them. Or check out some of the other threads about the /0/ folder, there are allot of them.
WiredPirate said:
Move them with Root Explorer or hook it up to the comp and move them. Or check out some of the other threads about the /0/ folder, there are allot of them.
Click to expand...
Click to collapse
Oh great... and I added one to the lot... Sorry guys!
Didn't think of searching with the "0" folder as keyword.
Thanks though for the reply and solution!
One quick question, do you know if the "Legacy" and "obb" folders are important?
I'm sure they are significant for some reason, but I am unsure of their specific purpose. I would for sure keep them in tact.
Hmmm... I moved them and now all my sd card files are scattered around...
Some in legacy, some in "0", some in media... probably best to wipe the lot and start from scratch?
From another post about Android 4.2's filesystem setup:
Cilraaz said:
Source: init.tuna.rc
Code:
on init
# See storage config details at [URL="http://source.android.com/tech/storage"][COLOR=#0066cc]http://source.android.com/tech/storage[/COLOR][/URL]
mkdir /mnt/shell/emulated 0700 shell shell
mkdir /storage/emulated 0555 root root
export EXTERNAL_STORAGE /storage/emulated/legacy
export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
export EMULATED_STORAGE_TARGET /storage/emulated
# Support legacy paths
symlink /storage/emualted/legacy /sdcard
symlink /storage/emualted/legacy /mnt/sdcard
symlink /storage/emualted/legacy /storage/sdcard0
symlink /mnt/shell/emulated/0 /storage/emulated/legacy
[...]
# virtual sdcard daemon running as media_rw (1023)
service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
class late_start
[...]
Click to expand...
Click to collapse
You said which ROMs you flashed, but what version of Android are you on now? It sounds like you might be back on 4.1.x, since you're seeing 0, legacy, and obb in /sdcard.
If you went back to 4.1.x, then 0, legacy, and obb are not important. Only /data/media matters on 4.1.x. If you are on 4.1.x, go to /data/media/0 and copy all of the files there to /data/media, then reboot. That will fix your setup. Once that's done and 0, legacy, and obb are all empty, they are safe to delete.
If you are on 4.2 or 4.2.1, then the above quote is accurate. Your information should be in /data/media/0 and the system should be properly fuse mounting and symlink'ing to showyour data into /sdcard.
When moving files around, it's usually best to do it at the source (within /data/media) so you don't have to worry about the fuse mounts and symlinks causing a problem.
I switched from 4.1 to 4.2.1.
Problem is I started switching things around and now my sd card files seem te be everywhere.
Can't figure out what is what...
I moved everything from "data/media/0" to "data/media"
but now my system can't find my files.
When I try to move everything back it says "unable to execute the command"
diSke said:
I switched from 4.1 to 4.2.1.
Problem is I started switching things around and now my sd card files seem te be everywhere.
Can't figure out what is what...
I moved everything from "data/media/0" to "data/media"
but now my system can't find my files.
When I try to move everything back it says "unable to execute the command"
Click to expand...
Click to collapse
As my post said, if you're on 4.2.1, your files should be in /data/media/0. You'll see copies of them in multiple places (/storage/emulated/legacy, /sdcard, /mnt/shell/emulated/0, /mnt/sdcard, /storage/sdcard0, and /data/media/0), but these are fuse mounts and symlinks. Your data only "physically" exists in one place: /data/media/0. After rebooting, your files should be found in /sdcard, rather than /sdcard/0. If not, then you might have the multiple 0 folder issue (e.g. /data/media/0/0/0, which ends up being /sdcard/0/0) from having an outdated version of your recovery.
Long story short, if you're on 4.2.1, then any files from your "SD Card" should be found in /data/media/0. If you're on 4.1.x, then they should be in /data/media.
If you're getting that error when trying to copy from /data/media to /data/media/0, then you'll need to check that /data/media is mounted as r/w and that you have write permission to the 0 folder within it. You should also be copying these files around as root (either through terminal emulator or a root file browser like Root Explorer).
Cilraaz is correct, however if you are looking for an easy way to straighten it out you can do the following.
Copy everything you want to save to the computer.
Reboot into recovery and format data. (Not wipe data actually format.)
Reboot phone and data partition will be good to go again.
Copy files back from computer and you should be as you were previously.
Of course all other data will be gone but I'm sure if you are a crack flasher you can get all that back.
G-Nexus Sent
ifly4vamerica said:
Cilraaz is correct, however if you are looking for an easy way to straighten it out you can do the following.
Copy everything you want to save to the computer.
Reboot into recovery and format data. (Not wipe data actually format.)
Reboot phone and data partition will be good to go again.
Copy files back from computer and you should be as you were previously.
Of course all other data will be gone but I'm sure if you are a crack flasher you can get all that back.
G-Nexus Sent
Click to expand...
Click to collapse
Good call on the computer backup. You don't need to wipe data, though. Just backup what you want to save from storage to your computer, then flash userdata.img from the stock 4.2.1 ROM, which will wipe out and re-create the /data/media partition. Then when you reboot, the fuse mounts and symlinks will be properly recreated and you can use MTP to copy your data back (or adb push it to /data/media/0 or /sdcard).
Thanks guys.
Fixed it differently though, Completely wiped everything again and started from scratch.
Made a backup earlier of everything I wanted to save except for messages which I forgot (damnit)
But it's all good now
Please read forum rules before posting
Questions go in Q&A
Thread moved
Thank you for your cooperation
Friendly Neighborhood Moderator

system partition at 100%

Does anyone else have this problem? I'm currently at 100% on my system partition running freedomos
slaya811 said:
Does anyone else have this problem? I'm currently at 100% on my system partition running freedomos
Click to expand...
Click to collapse
While installing try to avoid as many gapps as u can, u can install them later. I selected them all and it didn't boot for me.
Sent from my ONEPLUS A5010 using Tapatalk
[email protected] said:
While installing try to avoid as many gapps as u can, u can install them later. I selected them all and it didn't boot for me.
Click to expand...
Click to collapse
I've tried that as that was the only way I could get through the installation. What is your system partition at right now?
How to check that, I'm on OOS right now, twrp installed.
Sent from my ONEPLUS A5010 using Tapatalk
[email protected] said:
How to check that, I'm on OOS right now, twrp installed.
Click to expand...
Click to collapse
In a root browser file manager look for root storage or system partition
Like this
Mine is @96%. How does this affect my system?
[email protected] said:
Mine is @96%. How does this affect my system?
Click to expand...
Click to collapse
For me I can't install certain things like Xposed it says there is no room for it
Anyone on the stock oos know what their system partition is?
I assume it must be possible to make room in /system by deleting apks that have been updated in /data.
I have done so in the past with certain tools (need root), for example systemcleanup. However I am not sure which tool, today, would be best to specifically know what can be removed on oos (libs and dex and dalvik). Any suggestion is welcome.
Note: my /system is not full but I simple wonder what the experts might advice.
Dior DNA said:
I assume it must be possible to make room in /system by deleting apks that have been updated in /data.
I have done so in the past with certain tools (need root), for example systemcleanup. However I am not sure which tool, today, would be best to specifically know what can be removed on oos (libs and dex and dalvik). Any suggestion is welcome.
Note: my /system is not full but I simple wonder what the experts might advice.
Click to expand...
Click to collapse
Using Link2SD (or other tool) I spot >100MB System WebView apk to be frozen in system.
Can someone confirm it is safe to delete WebView apk (root required) from /system?
Similarly many (17) Gapps in system are updated. I guess I can delete the system apk's as well
(say for big apps that are not needed for Play Store). Notably Chrome is >100MB too.
Can someone confirm it is safe to delete Chrome apk (root required) from /system?
Dior DNA said:
Using Link2SD (or oher tool) I spot >100MB System WebView apk to be frozen in system.
Can someone confirm it is safe to delete WebView apk (root required) from /system?
Similarly many (17) Gapps in system are updated. I guess I can delete the system apk's as well
(say for big apps that are not needed for Play Store). Notably Chrome is >100MB too.
Can someone confirm it is safe to delete Chrome apk (root required) from /system?
Click to expand...
Click to collapse
Chrome, sure. Webview I would not delete
Dior DNA said:
Using Link2SD (or oher tool) I spot >100MB System WebView apk to be frozen in system.
Can someone confirm it is safe to delete WebView apk (root required) from /system?
Similarly many (17) Gapps in system are updated. I guess I can delete the system apk's as well
(say for big apps that are not needed for Play Store). Notably Chrome is >100MB too.
Can someone confirm it is safe to delete Chrome apk (root required) from /system?
Click to expand...
Click to collapse
It's frozen so it's not in use, same as on my system. I deleted it as it's in play store if I need it again but it didn't make a difference to my system partition storage at all, I still only have 81mb free. I also backed up with titanium backup.
I went ahead and deleted Chrome and WebViewGoogle directories from /system/app ...
There may be some libraries I could also have deleted. I don't know.
I saved few 100M in /system (and 1 file in dalvik-cache).
I made system TWRP backup first.
Code:
OnePlus5T:/data/root # cd /system
before:
Code:
OnePlus5T:/system # df -k .
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/block/bootdevice/by-name/system
2999516 2859676 123456 96% /system
after:
Code:
OnePlus5T:/system # df -k .
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/block/bootdevice/by-name/system
2999516 2621784 361348 88% /system
Have a nice day
Dior DNA said:
I went ahead and deleted Chrome and WebViewGoogle directories from /system/app ...
There may be some libraries I could also have deleted. I don't know.
I saved few 100M in /system (and 1 file in dalvik-cache).
I made system TWRP backup first.
Code:
OnePlus5T:/data/root # cd /system
before:
Code:
OnePlus5T:/system # df -k .
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/block/bootdevice/by-name/system
2999516 2859676 123456 96% /system
after:
Code:
OnePlus5T:/system # df -k .
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/block/bootdevice/by-name/system
2999516 2621784 361348 88% /system
Have a nice day
Click to expand...
Click to collapse
Hi all
I have no good explanation (expect from android.webkit.WebView logcat Errors),
but I would discourage to remove frozen WebViewGoogle.
It leads to random app crashes on my 1+5T ... so I restored /system (and SuperSU).
Removing Chrome turns out to not be a problem.
Have a nice day

Adb backup not backing up (Nougat)

I'm trying to back up my phone with adb because rooting will have to involve wiping. I've tried backing up with
Code:
adb backup -apk -shared -all -f backup.ab
and similar commands (noapk, noshared...), but whatever I do I can't get a backup bigger than about 1.5GB. This is a problem as my whole 32GB internal memory is almost full, and it's not just files, one of my apps alone shows up as using 2.5GB storage. How do I backup the whole phone?
I'm using adb.exe from platform tools from developer.android.com, my phone is Android 7.0, software 2.41.401.41
Edit: I've managed to open up the ab file and it's almost all just system stuff (com.htc.china.location.service, why the hell would I want to back that up??), and about a dozen of my apps (only 40MB of them), and for at least one the storage is missing.

Categories

Resources