Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
WACOMalt
Old
(Last edited by WACOMalt; 6th August 2010 at 05:38 AM.)
#1  
Member - OP
Thanks Meter 4
Posts: 38
Join Date: Jul 2009
Question [Q] Shell Script help please

Hi there, so I have heard there's some way to write sh scripts for android?

I am wanting to make an easy way to randomly change one line in an XML file located on the flash. Meaning it'll need su priviledges.

Basically I'm wanting to make something that'll change the mobile id for grooveshark with one touch, so the trial wont expire (why oh why don't they go to their usual ad supported method?)

I want to make a shortcut on my home screen that I can touch to to reset my trial

Any pointers?

These are the contents of the XML file in /data/data/com.grooveshark.android.v1/

Grooveshark.xml:

<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
<string name="cc4">8765432198</string>
<string name="cc1">0</string>
<string name="cc2">0</string>
<boolean name="hasTrialStarted" value="true" />
<string name="cc3">0</string>
<int name="splashSponsoredExpires" value="0" />
<boolean name="trialHasExpired" value="false" />
<string name="cid">229</string>
<string name="loginUnPwToken">5f4dcc3b5aa765d61d8327deb882 cf99</string>
<string name="username">username</string>
<string name="sessionID">c3a5a6eca887891b9bf69687badb7531</string>
<long name="mobileID" value="555554" />
<int name="sponsoredSplashCount" value="0" />
<int name="trialExpiresTime" value="1382277664" />
<int name="splashSponsorID" value="0" />
<boolean name="gs_tos_bool" value="true" />
<int name="trialNumPlays" value="0" />
</map>

I changed any numbers that'd allow you to auto log in as me

The important part is: <long name="mobileID" value="555554" />

that value has to change whenever your trial expires.


Can anyone give me some pointers? I don't need a tutorial, just an example of shell scripts on the home screen of android.
 
WACOMalt
Old
#2  
Member - OP
Thanks Meter 4
Posts: 38
Join Date: Jul 2009
Well, I have an update. I couldn't find any good reference for shell scripts on linux, so I went ahead and just set up the SDK. I don't have too much java experience, bt I was able to get the interface made pretty easily using the online resources. Now I simply need to make the button in the app death the xml file, find that string and replace it with a random number. I anyone has some good examples of how to search and edit the contents of a file, that'd be awesome. Any takers?

Sent from my DROIDX using XDA App
 
burnice
Old
#3  
burnice's Avatar
Member
Thanks Meter 12
Posts: 45
Join Date: Oct 2010
Location: Montevideo
any new??
 
Post Reply+
Tags
android, grooveshark, script, shell, trial
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...