Samsung Moment
Find Your Forum
  
Welcome, Guest. Please login or register.
Did you miss your activation email?

News: Do you like Samsung Moment?
Advanced search
Scratch-Proof your Samsung Moment        Best Price on Sprint Phones      Screen Protection Latest Ringtone for your mobile
Pages: 1 2 [3]
Print
Topic: datatool usage  (Read 3680 times)
zefie
Pro Member
****

Cookies: 29
Posts: 458


View Profile
« Reply #30 on: January 04, 2010, 04:38:18 PM »


instead of /sbin/busybox ash
you shoudl be able to just use SU (i believe zef said he made su as a shortcut to ash)

I wanted to invoke it in the same manner as the shebang line of the script though, just to be sure that wasn't adding an additional variable to the test. 

The result is the same using su for me.

Lol was more of a FYI thing

try it in a script coz it didnt work in a script it would say not a command or something
Logged
KeithKris
Newbie
*

Cookies: 0
Posts: 7


View Profile
« Reply #31 on: January 04, 2010, 04:43:17 PM »


instead of /sbin/busybox ash
you shoudl be able to just use SU (i believe zef said he made su as a shortcut to ash)

I wanted to invoke it in the same manner as the shebang line of the script though, just to be sure that wasn't adding an additional variable to the test.  

The result is the same using su for me.

Lol was more of a FYI thing

try it in a script coz it didnt work in a script it would say not a command or something

Did you dos2unix it?  That's a pretty common error in linux when it's trying to interpret the ctrl-M that windows puts on new lines as part of the shebang.

*edit*

Scratch that, I'm making this way more involved than it should be. Here's the unix formatted version, ignore the one from my previous posting.

* datatool (2.1 KB - downloaded 13 times.)
« Last Edit: January 04, 2010, 04:46:17 PM by KeithKris » Logged
zefie
Pro Member
****

Cookies: 29
Posts: 458


View Profile
« Reply #32 on: January 04, 2010, 08:04:15 PM »


instead of /sbin/busybox ash
you shoudl be able to just use SU (i believe zef said he made su as a shortcut to ash)

I wanted to invoke it in the same manner as the shebang line of the script though, just to be sure that wasn't adding an additional variable to the test.  

The result is the same using su for me.

Lol was more of a FYI thing

try it in a script coz it didnt work in a script it would say not a command or something

Did you dos2unix it?  That's a pretty common error in linux when it's trying to interpret the ctrl-M that windows puts on new lines as part of the shebang.

*edit*

Scratch that, I'm making this way more involved than it should be. Here's the unix formatted version, ignore the one from my previous posting.

# datatool backup
ash: 7739344: unknown operand

I found the problem, we can't accurately use your method. The df output is not tab delimited, it uses spaces. we can hard code the spaces but if the memory card is smaller or bigger it will screw up. aka what works on my 8gb wont work on a 512m or a 16gb, ect.

We need to strip the excess spaces:

data usage: $(df /data | cut -d K -f 3 | sed -e "s/[ ]*/\:/g" | cut -d ":" -f 4 | tail -n 1)
sdcard available: $(df /sdcard | cut -d K -f 3 | sed -e "s/[ ]*/\:/g" | cut -d ":" -f 5 | tail -n 1)


this turns it all into one :

so its like:
:/dev/stl6:285728:115648:170080:40%:/data


final datatool attached and will be in ze09.

* datatool (2.18 KB - downloaded 13 times.)
« Last Edit: January 04, 2010, 08:36:15 PM by zefie » Logged
Burst
Full Member
***

Cookies: 4
Posts: 119


Get some!


View Profile WWW
« Reply #33 on: January 06, 2010, 03:49:35 AM »

Quote
C:\Users\KatieB\Desktop\Moment\android-sdk\tools>adb shell
$ su
su
# datatool backup
datatool backup
/sdcard not mounted. Please mount /sdcard and run this program again.

so does this not work or should i use the other method?
Logged
zefie
Pro Member
****

Cookies: 29
Posts: 458


View Profile
« Reply #34 on: January 06, 2010, 04:02:07 AM »

Quote
C:\Users\KatieB\Desktop\Moment\android-sdk\tools>adb shell
$ su
su
# datatool backup
datatool backup
/sdcard not mounted. Please mount /sdcard and run this program again.

so does this not work or should i use the other method?

ZE08.1 will have the fix.
Logged
Burst
Full Member
***

Cookies: 4
Posts: 119


Get some!


View Profile WWW
« Reply #35 on: January 06, 2010, 04:03:32 AM »

sweetness
Logged
Pages: 1 2 [3]
Print
Jump to:  

Got a new phone? Find the forum here


Related Topics
Subject Started by Replies Views Last post
Had Unlimited Data Usage
General Android discussions
miahdog 4 14441 Last post February 18, 2010, 12:01:17 PM
by zcarman
Data usage when tethering
General Samsung Moment Discussion
krzyglu 6 1454 Last post February 27, 2010, 09:30:27 PM
by dolinmyster
Datatool backup not performed
Rooting
rwebb616 1 713 Last post April 09, 2010, 01:55:57 PM
by rwebb616
How much battery usage is normal?
Android 2.1 Discussions
Airmack 2 1004 Last post May 20, 2010, 03:56:12 PM
by Rischtofu
Android System Battery Usage
General Samsung Moment Discussion
Risket 6 2319 Last post July 09, 2010, 02:02:17 PM
by munkytown




Galaxy S3 | Galaxy Note | Galaxy Nexus | Kindle Fire | Atrix 4G | Motorola Xoom | Windows Phone 7
Nokia Lumia | Tech Support Forum | Top Hosts | Samsung Galaxy Tab | Samsung Galaxy S2 | Samsung Galaxy S | Samsung Wave
HTC Evo 3D | HTC Evo 4G | HTC Incredible | HTC Incredible 2 | HTC Incredible S | HTC Thunderbolt
Motorola Droid Razr
| HTC Desire | HTC Desire HD | HTC Desire Z | HTC Desire S | HTC Wildfire
Motorola Droid | Galaxy Indulge | Nokia N8 | Droid Charge | Droid X | Droid X2 | Droid 2| Droid 3 | Fascinate
HTC Sensation | HTC Flyer | LG Revolution | Asus Transformer | Xperia Play | iPhone 4 | Nexus S | Droid Bionic
HTC One | HTC Wildfire S | HTC Droid Eris


This is an Un-Official fan based Website. The views expressed on this website are solely those of the proprietor, or contributors to the site, and do not necessarily reflect the views or opinions of the parties it covers, and is not affiliated with, endorsed or sponsored by parties involved.
If you have a problem with any of the content posted on this website, please contact "mobile@vssupportqueue.com"
Term of Use | Privacy Policy | BlackRain 2006 by, Crip



Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Sitemap