FORUMS
Remove All Ads from XDA

[TOOLS][ZIPS][SCRIPTS] osm0sis' Odds and Ends [Multiple Devices/Platforms]

13,640 posts
Thanks Meter: 30,083
 
By osm0sis, Recognized Developer / Recognized Contributor on 18th April 2013, 12:37 AM
Post Reply Email Thread
19th May 2015, 05:37 PM |#341  
hhp_211's Avatar
Senior Member
Thanks Meter: 939
 
More
Quote:
Originally Posted by osm0sis

Scripts[LIST]dalvik2cache init.d script (all devices) - link
Bind mounts the dalvik-cache directory to the cache partition. Useful on devices where the cache is sizable and unlikely to be used for OTAs (custom ROM, etc.), and the data partition is not. Every little bit counts![/B][/SIZE]

Hey, wanted to pick your brain a minute.

the lead up::
I have a Gen 1 Moto G whopping 8 GB model,,,
'/data' partition is roughly 5.52 GB available space on a empty device,,, '/cache' partition is 662 MB
on android 5.1.x Roms ART dalvik cache partition, '/data/dalvik-cache' is running at about 1013 MB

the question(s)::
Is it even possible to use your script on this device since ART is 60% larger than the size of /cache partition?
wouldn't the optimization process fail during boot? or would it only store what it can in /cache and rest in original '/data/dalvik-cache' ?

also the '/data' partition is f2fs where as '/cache' is ext4, would there be any noticeable difference in speed?

As a second option I was thinking of maybe using the script to have TitaniumBackup use the '/cache' partition
I currently have is storing about 581 MB
If I go this route would I link it as '/sdcard/TitaniumBackup' or as '/storage/emulated/0/TitaniumBackup' ?


the rambling::
what I'm doing right now with /cache is storing a 2nd gapps package and a 2nd ROM as a safety net when flashing new ROMS
My '/data' normally runs @ 5 GB of it's generous 5.52 GB capacity with backups, apps to try, kernels, themes, etc, etc.
I have to get creative backing up things to cloud, otg or pc storage, especially with a full TWRP backup weighing in at 1.25GB thanks to ART optimizations I can't just go and have a quick restore lounging around on my device anymore.
 
 
20th May 2015, 11:29 AM |#342  
Wolfbreak's Avatar
Inactive Recognized Developer
Thanks Meter: 11,576
 
Donate to Me
More
@osm0sis

Keep up the good work this Thread has alot of helpful Informations for Modders/ROM Cookers and so on.

BTW: I sent you a PM
The Following User Says Thank You to Wolfbreak For This Useful Post: [ View ] Gift Wolfbreak Ad-Free
20th May 2015, 03:19 PM |#343  
osm0sis's Avatar
OP Recognized Developer / Recognized Contributor
Flag Halifax
Thanks Meter: 30,083
 
Donate to Me
More
Quote:
Originally Posted by hhp_211

Hey, wanted to pick your brain a minute.

the lead up::
I have a Gen 1 Moto G whopping 8 GB model,,,
'/data' partition is roughly 5.52 GB available space on a empty device,,, '/cache' partition is 662 MB
on android 5.1.x Roms ART dalvik cache partition, '/data/dalvik-cache' is running at about 1013 MB

the question(s)::
Is it even possible to use your script on this device since ART is 60% larger than the size of /cache partition?
wouldn't the optimization process fail during boot? or would it only store what it can in /cache and rest in original '/data/dalvik-cache' ?

also the '/data' partition is f2fs where as '/cache' is ext4, would there be any noticeable difference in speed?

As a second option I was thinking of maybe using the script to have TitaniumBackup use the '/cache' partition
I currently have is storing about 581 MB
If I go this route would I link it as '/sdcard/TitaniumBackup' or as '/storage/emulated/0/TitaniumBackup' ?


the rambling::
what I'm doing right now with /cache is storing a 2nd gapps package and a 2nd ROM as a safety net when flashing new ROMS
My '/data' normally runs @ 5 GB of it's generous 5.52 GB capacity with backups, apps to try, kernels, themes, etc, etc.
I have to get creative backing up things to cloud, otg or pc storage, especially with a full TWRP backup weighing in at 1.25GB thanks to ART optimizations I can't just go and have a quick restore lounging around on my device anymore.

dalvik2cache is all or nothing, so it sounds like you wouldn't have enough room using ART. ext4 can be faster than f2fs depending on the mount options you're using on both, but you'll likely be fine with f2fs and dalvik-cache on data. Bind mounting Titanium is a good idea by the sounds of it, just make sure you mount it on the actual directory, probably in /data/media/0/, not the emulated/symlinked ones. Cheers.

Quote:
Originally Posted by Wolfbreak

@osm0sis

Keep up the good work this Thread has alot of helpful Informations for Modders/ROM Cookers and so on.

BTW: I sent you a PM

Quote:
Originally Posted by Wolfbreak

Very nice Scripts, i just saw your Thread and had a look on it.
I wanted to ask you for Permission to modify it and use it in my ROM for Xperia Z3 with proper Credits of course.

Regards
Wolfbreak

Feel free! Always glad to see adoption on other devices. Let us know how it goes.
The Following User Says Thank You to osm0sis For This Useful Post: [ View ]
20th May 2015, 06:35 PM |#344  
hhp_211's Avatar
Senior Member
Thanks Meter: 939
 
More
Quote:
Originally Posted by osm0sis

dalvik2cache is all or nothing, so it sounds like you wouldn't have enough room using ART. ext4 can be faster than f2fs depending on the mount options you're using on both, but you'll likely be fine with f2fs and dalvik-cache on data. Bind mounting Titanium is a good idea by the sounds of it, just make sure you mount it on the actual directory, probably in /data/media/0/, not the emulated/symlinked ones. Cheers.

I knew there was a path I couldn't remember at the time
/data/media/0/TitaniumBackup/

Thanks for the advice!
I'll give it a whirl.
I'll just have to be careful with scripts that auto wipe cache partitions and keep a backup of that stored.
The Following User Says Thank You to hhp_211 For This Useful Post: [ View ] Gift hhp_211 Ad-Free
25th May 2015, 10:56 AM |#345  
preacher65's Avatar
Senior Member
Flag near London
Thanks Meter: 1,416
 
More
Quote:
Originally Posted by osm0sis

Note: If ever restoring a sdcard backup to your device with adb push, you'll want to use my sdcard Fix Permissions Script Zip afterwards to avoid some problems that can arise from adb push setting root:root owner/group and full 777 (rwxrwxrwx) permissions to files.

Hi, firstly thanks for these great scripts. I've been making a lot of use of the ADBsync sdcard Backup script and it's a real time saver, so thanks to you and @Renate NST for your great work. I have a quick question about the best way to restore - can I just boot into recovery and use the following from a command prompt inside the relevant folder (same level as the batch file)?
Code:
adb push sdcard/0 /sdcard
followed by flashing the permissions fix? Or should I use
Code:
adb push sdcard/0 /data/media/0
Does that make any difference at all? Not sure how recovery and/or adb is handling the paths.
Or even
Code:
adb push sdcard /data/media
since the backup script also creates a folder called sdcard/obb alongside sdcard/0, but all it ever seems to have inside it is a .nomedia file. Not sure if I need to copy that or not.
I'm using it on mako, flounder and bacon, if that's relevant - all three have an internal sdcard.
The Following User Says Thank You to preacher65 For This Useful Post: [ View ] Gift preacher65 Ad-Free
25th May 2015, 11:08 AM |#346  
osm0sis's Avatar
OP Recognized Developer / Recognized Contributor
Flag Halifax
Thanks Meter: 30,083
 
Donate to Me
More
Thanks! Third option is best if I recall correctly; I've heard that you're better using the direct location (/data/media) over the symlink/fuse mount (/sdcard) for improved speed. Then you're right, sdcard permissions fix should clean things up for boottime.

Most would want the whole sdcard restored since games store large files in obb.
The Following User Says Thank You to osm0sis For This Useful Post: [ View ]
25th May 2015, 11:20 AM |#347  
preacher65's Avatar
Senior Member
Flag near London
Thanks Meter: 1,416
 
More
Quote:
Originally Posted by osm0sis

Thanks! Third option is best if I recall correctly; I've heard that you're better using the direct location (/data/media) over the symlink/fuse mount (/sdcard) for improved speed. Then you're right, sdcard permissions fix should clean things up for boottime.
Most would want the whole sdcard restored since games store large files in obb.

Thanks for the super-speedy reply. I've been having what I think are some hardware issues with the camera on my bacon, and have to keep flashing stock ROMs while tech support establish whether it's a software problem or hardware. Kind of tedious, but I guess they don't know if I'm doing it all correctly or not. But it means I keep losing my sdcard contents when I flash the stock ROMs, so this script has been a life saver! However I've been reflashing the ROM, booting into android, then copying sdcard contents back manually, and want to streamline the process - since there are nandroid backups on the sdcard, I can just sync the contents back to the device in recovery and then use restore.

Useful to know about the mount points and speed, and now I know what the obb folder's there for. Should have googled it before posting.
The Following User Says Thank You to preacher65 For This Useful Post: [ View ] Gift preacher65 Ad-Free
8th June 2015, 07:01 PM |#348  
Senior Member
Flag Bangalore
Thanks Meter: 288
 
More
@osmosis and any body else

Sorry for this off topic post but thought I would try

I am looking for an app preferably or a script that simulates mobile usage like talking, testing, browsing, on line video etc that can be run from the mobile without needing a lap top. This should be configurable to run for X hours
What I am trying to do is to see how much power is consumed under different GPU and CPU frequencies

Can somebody help please

Sent from my GT-N7100 using XDA Free mobile app
8th June 2015, 07:47 PM |#349  
osm0sis's Avatar
OP Recognized Developer / Recognized Contributor
Flag Halifax
Thanks Meter: 30,083
 
Donate to Me
More
Quote:
Originally Posted by beeshyams

@osmosis and any body else

Sorry for this off topic post but thought I would try

I am looking for an app preferably or a script that simulates mobile usage like talking, testing, browsing, on line video etc that can be run from the mobile without needing a lap top. This should be configurable to run for X hours
What I am trying to do is to see how much power is consumed under different GPU and CPU frequencies

Can somebody help please

You can't simulate actual user actions easily, but you can at least start and stop apps from the command line using the "am" command. You could rig it up on a timer to start and stop the SMS/MMS app, browser, etc. periodically.
The Following User Says Thank You to osm0sis For This Useful Post: [ View ]
8th June 2015, 08:13 PM |#350  
Senior Member
Flag Bangalore
Thanks Meter: 288
 
More
Quote:
Originally Posted by osm0sis

You can't simulate actual user actions easily, but you can at least start and stop apps from the command line using the "am" command. You could rig it up on a timer to start and stop the SMS/MMS app, browser, etc. periodically.

Thanks for a quick reply

Opening and closing of apps I guess is not tough. Stimulating user actions is what I had in mind. But yes it won't be easy.
One can use MacroDroid for triggering various apps but all of them require user intervention.

I was thinking of one app of it exists that say plays music for x minutes, browses for x minutes , on line video for x minutes etc and all these add up to say a couple of hours . calling ( toll free customer care numbers in peak hours is a great idea, takes hours to get through , texting yourself etc can then be added. All of this, well most of it at least if it can be done without any user intervention, then one can run the test , say when sleeping and see the power used. That is what I had in mind. Googling didn't help

Thanks again

Sent from my GT-N7100 using XDA Free mobile app
9th June 2015, 08:52 PM |#351  
mdamaged's Avatar
Senior Member
Flag South of Heaven
Thanks Meter: 1,454
 
More
Quote:
Originally Posted by beeshyams

@osmosis and any body else

Sorry for this off topic post but thought I would try

I am looking for an app preferably or a script that simulates mobile usage like talking, testing, browsing, on line video etc that can be run from the mobile without needing a lap top. This should be configurable to run for X hours
What I am trying to do is to see how much power is consumed under different GPU and CPU frequencies

Can somebody help please

Sent from my GT-N7100 using XDA Free mobile app



Well, I know Battery HD by smallte.ch has a calibration function which does those things. You could likely do most if not all those things with tasker as well.
The Following User Says Thank You to mdamaged For This Useful Post: [ View ] Gift mdamaged Ad-Free
Post Reply Subscribe to Thread

Tags
automation, batch, flashable zip, script, tool

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes