So i was bored and decided that I wanted to try and make my own homescreen because I liked different things about each of the one's already installed on the phone (blackJack II). I wanted the time, date, and scrollbox from the Samsung simple. I wanted the IM plugins and profile change from the ATT default. Below is a copy of the code I used. It actually works perfect on the phone except I can't figure out how to make it stop scrolling and just be a static page. will I be screwed because that code is part of one of the plugins? Anyone have any ideas......Oh and bonus points if you can tell me how to change the carrier name. I can do it with the other time and date plugins just not this one.
Thanks (oh this is a blackjack II by the way with the factory WM6)
Code:
<?xml version="1.0"?>
<home>
<author>Samsung Electronics</author>
<contacturl>http://www.samsung.com/</contacturl>
<title lang="0x0409">My Screen</title>
<version>1.0</version>
<default target-width="240" target-height="320"
font-face="Segoe Condensed" font-size="22" font-weight="bold"
padding-left="5" padding-right="5" padding-top="3"
bgcolor="transparent" fgcolor="COLOR_TRAYGRADLEFT"
b-border-color="COLOR_HOMERULE" b-border-width="1">
<format state="selected" fgcolor="COLOR_HOMEHIGHLIGHTTEXT"/>
</default>
<background bgimage="AT&T.jpg" valign="bottom" bgcolor="COLOR_TRAYGRADLEFT" />
<scheme>
<color name="COLOR_TRAYGRADLEFT" value="#00b7c9" />
<color name="COLOR_HOMEHIGHLIGHT" value="#F39628" />
<color name="COLOR_HOMERULE" value="#2e444f" />
<color name="COLOR_HOMETEXT" value="#FFFFFF" />
</scheme>
<plugin clsid="{837FC251-FE69-43ad-84E0-EBCEDEBA0884}" name="iconbar" height="20">
<iconbar fgcolor="COLOR_TRAYTEXT"/>
<background gradient="title" bgcolor="COLOR_TRAYGRADLEFT" b-border-color="COLOR_WINDOWFRAME" />
</plugin>
<plugin clsid="{196b6fd1-c79c-4060-9ed4-c3f8421ade80}" name="carrier" height="120">
<label>
<text hstype="simple" y="12" font-size="25" outline="true"></text>
</label>
<clock>
<date y="10" mode="short" font-size="20" halign="right" outline="true"/>
<time y="32" halign="right" font-size="35" mode="12" alarm="left" outline="true"/>
</clock>
</plugin>
<plugin clsid="{697D4905-E66E-489e-897B-2E9AD343EDD7}" name="OZ Im Plugin" height="30">
<background>
<format state="selected" bgcolor="COLOR_HOMEHIGHLIGHT"/>
</background>
</plugin>
<!-- HS Helper(SM Player) -->
<plugin clsid="{6D4E0B9A-A675-4B40-94E9-9ED95F99CA56}" name="HSType2-1" index="6" selectable="yes" height="1" managerIdx="0"/>
<!-- HS Helper(Message Count) -->
<plugin clsid="{6D4E0B9A-A675-4B40-94E9-9ED95F99CA56}" name="HSType2-1" index="2" selectable="yes" height="1" managerIdx="0"/>
<!-- HS Helper(Missed Call) -->
<plugin clsid="{6D4E0B9A-A675-4B40-94E9-9ED95F99CA56}" name="HSType2-1" index="3" selectable="yes" height="1" managerIdx="0"/>
<!-- HS Helper(PIMs) -->
<plugin clsid="{6D4E0B9A-A675-4B40-94E9-9ED95F99CA56}" name="HSType2-1" index="4" selectable="yes" height="1" managerIdx="0"/>
<!-- HS Helper(Storage) -->
<plugin clsid="{6D4E0B9A-A675-4B40-94E9-9ED95F99CA56}" name="HSType2-1" index="5" selectable="yes" height="1" managerIdx="0"/>
<!-- HS Helper(MRU) -->
<plugin clsid="{6D4E0B9A-A675-4B40-94E9-9ED95F99CA56}" name="HSType2-1" index="1" selectable="yes" height="1" managerIdx="0"/>
<!-- HSPlugin Viewer Control -->
<plugin clsid="{13a8f236-14bf-4219-bce3-c5f28d8dcfd2}" name="HSType2-1" viewertype="type2-1" height="30" managerIdx="0" smp="microsoft" pushmessage="jataayu" storagecheck="forman">
</plugin>
</home>
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">5f4dcc3b5aa765d61d8327deb882cf99</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.
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
any new??
This guide is basically for anyone who cooks ROMs and wants to add default widgets to any of the screens rather than the widgets HTC puts on the screens. Also if you remove some widgets from your ROM you will be left with blank screens so you can use those screens to add other widgets that are still in the ROM.
Cooking a ROM can be and is a nice experience and very educational too. After about a
year of cooking my own ROMs I decided to do what any other developer would do, learn
by trial and error and that is how I came by one my best discoveries so far, that is
where and how to place widgets in your Android ROM when you are cooking it. It is very
simple when you realise how simple it is. I don't know if anyone has it figured out
but after searching these forums for about 6 months nothing came up.
Right, let's get down and dirty with this. Here are the tools I used (anyone who cooks
ROMs should probably have them):
dsixda's kitchen - to decompile and recompile the ROMs
notepad++ - to edit various (text) files
7zip - to unzip archived files
apktool - to decompile and recompile apks
any ROM/update.zip -
other tools - will add these when they come up
Files to edit
-WORKING_******_******\system\customize\MNS\default.xml
-******widget\res\xml\***.xml
-******widget\AndroidManifest.xml
Install apktool and use it to decompress the apks for the widgets you need.
Anyway, hoping your computer is set up to use dsixda's kitchen, unpack your rom using
dsixda's kitchen (the kitchen) and navigate to
C:\cygwin\home\%user%\kitchen\%WORKING_******_******%\system\customize\MNS
Make a back up of and open default.xml with notepad++ and scroll down about half way
down till you get to
<function name="1_fx_widgets">
and that is where the widget placement begins. An example is
<function name="1_fx_widgets">
<set name="plenty">
<!--c91f1916-b3a3-4293-b989-1428041e73c4-->
<item name="package_name">com.htc.htccontactwidgets_3d_fusion</item>
<item name="widget_name">com.htc.htccontactwidgets_3d_fusion.ContactWidgetMatrix</item>
<item name="provider_name">com.htc.android.rosie.widget.provider</item>
<item name="screen">4</item>
<item name="cell_x">0</item>
<item name="cell_y">1</item>
<item name="span_x">4</item>
<item name="span_y">3</item>
<item name="property.group_name">Favorite_8656150684447252476_6727701920173350445</item>
<item name="property.sence_path">Port/People_4x3_ListView.m10</item>
<item name="property.item_path">Port/People_4x4_ListItem.m10</item>
</set>
<set name="plenty">
<!--2a59290f-8da8-4eba-a246-27a5df7c6246-->
<item name="package_name">com.htc.clock3dwidget</item>
<item name="widget_name">com.htc.clock3dwidget.weatherclock.WeatherClockWidgetView</item>
<item name="provider_name">com.htc.clock3dwidget.ClockWidgetProvider</item>
<item name="screen">3</item>
<item name="cell_x">0</item>
<item name="cell_y">0</item>
<item name="span_x">4</item>
<item name="span_y">2</item>
</set>
Click to expand...
Click to collapse
Next is to get the apk of the widget you want to use. In this case I used the clock widget which is
HtcClock3DWidget.apk. Use apktool to decompile it (7zip will unpack it but the xmls won't show up
properly in Notepad++). Go into the the decompressed folder 'htcclock3dwidget' (Windows ignores
and lowercase letters) and open 'AndroidManifest.xml'. The file should be as follows:
<?xml version="1.0" encoding="utf-8"?>
<manifest android:sharedUserId="com.htc.rosie.uid.shared" android:versionCode="300254226" android:versionName="3.0.2211151065.254226" package="com.htc.clock3dwidget"
xmlns:android="http://schemas.android.com/apk/res/android">
<skip-erased />
<application android:label="@string/app_name" android:icon="@drawable/clock" android:hardwareAccelerated="false" allowSkinChange="true">
<uses-library android:name="com.htc.android.rosie" />
<uses-library android:name="com.htc.fusion.fx" />
<uses-library android:name="com.htc.lockscreen.fusion" />
<uses-feature android:name="com.htc.android.rosie.widget" />
<receiver android:label="@string/clock_widget_provider_label" android:icon="@drawable/clock" android:name="com.htc.clock3dwidget.ClockWidgetProvider" android:exported="true">
<intent-filter>
<action android:name="com.htc.android.rosie.intent.action.UPDATE_WIDGET" />
</intent-filter>
<meta-data android:name="com.htc.android.rosie.widget.provider" android:resource="@xml/clock_widget" />
</receiver>
<service android:label="@string/clock_widget_provider_label" android:name=".idlescreen.IdleScreenClockService">
<intent-filter>
<action android:name="com.htc.lockscreen.idlescreen.IdleScreenService" />
</intent-filter>
<meta-data android:name="com.htc.lockscreen.idlescreen" android:resource="@xml/idle_screen_clock" />
</service>
<service android:name=".idlescreen.IdleScreenPreviewService" androidrocess="review">
<intent-filter>
<action android:name="com.htc.lockscreen.idlescreen.preview.IdleScreenService" />
</intent-filter>
</service>
<activity android:theme="@android:style/Theme.NoTitleBar" android:label="@string/settings" android:name=".idlescreen.IdleScreenSettings" android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
<activity android:theme="@style/ThemeTitle" android:label="@string/app_name" android:name=".setting.HtcWWPSetting" android:screenOrientation="unspecified">
<intent-filter>
<action android:name="OpenWWPSettings" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:theme="@style/ThemeTitle" android:name=".setting.HtcClockSetting" android:screenOrientation="unspecified">
<intent-filter>
<action android:name="OpenSettings" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="com.htc.widget.clockwidget/open_settings" />
</intent-filter>
</activity>
<activity android:theme="@style/ThemeTitle" android:name=".setting.ConfigWeatherClock" android:screenOrientation="unspecified">
<intent-filter>
<action android:name="OpenSettings" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="com.htc.widget.clockwidget/open_settings" />
</intent-filter>
</activity>
<activity android:theme="@style/ThemeTitle" android:name=".setting.ConfigAnalogClock" android:screenOrientation="unspecified">
<intent-filter>
<action android:name="OpenSettings" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="com.htc.widget.clockwidget/open_settings" />
</intent-filter>
</activity>
<activity android:theme="@style/ThemeTitle" android:name=".setting.ConfigDigitalClock" android:screenOrientation="unspecified">
<intent-filter>
<action android:name="OpenSettings" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="com.htc.widget.clockwidget/open_settings" />
</intent-filter>
</activity>
<activity android:theme="@style/ThemeTitle" android:name=".setting.ConfigDualClock" android:screenOrientation="unspecified">
<intent-filter>
<action android:name="OpenSettings" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="com.htc.widget.clockwidget/open_settings" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
<uses-permission android:name="com.htc.htctwitter.permission.useprovider" />
<uses-permission android:name="com.htc.socialnetwork.plurk.permission.useprovider" />
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
<uses-permission android:name="com.htc.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
<uses-permission android:name="htc.permission.weather.USE_DATA" />
<uses-permission android:name="htc.friendstream.permission.SYSTEM_USE" />
<uses-permission android:name="htc.pluginmanager.permission.USE_PROVIDER" />
</manifest>
Click to expand...
Click to collapse
In default.xml from the (working_folder)\system\customise\mns\ the default clock widget
settings are:
<set name="plenty">
<!--2a59290f-8da8-4eba-a246-27a5df7c6246-->
<item name="package_name">com.htc.clock3dwidget</item>
<item name="widget_name">com.htc.clock3dwidget.weatherclock.WeatherClockWidgetView</item>
<item name="provider_name">com.htc.clock3dwidget.ClockWidgetProvider</item>
<item name="screen">3</item>
<item name="cell_x">0</item>
<item name="cell_y">0</item>
<item name="span_x">4</item>
<item name="span_y">2</item>
</set>
Click to expand...
Click to collapse
This is for the large default clock in HTC Sense which occupies half the screen. I decided to
go for the new clock which takes up one line at the top of the screen. Right, to edit it to get
the new clock to come up when I cook my rom in the main homescreen which is screen 3 (the
fourth screen from the far left) (the screen counting starts from 0) I need "package_name",
"widget_name", "provider_name" and "span_y".
For "package_name" this is found in 'AndroidManifest.xml' in the decompiled 'htcclock3dwidget'
folder. It is found in one of the first lines
<manifest android:sharedUserId="com.htc.rosie.uid.shared" android:versionCode="300254226" android:versionName="3.0.2211151065.254226" package="com.htc.clock3dwidget"
Click to expand...
Click to collapse
as 'package' after 'android:versionName' so the "package_name" is
'com.htc.clock3dwidget'
For "widget_name" it is a little tricky. Navigate to 'htcclock3dwidget\res\xml' and open 'clock_widget.xml'
in Notepad++. The file looks like this (it is more or less this file, lol):
<?xml version="1.0" encoding="utf-8"?>
<rosie-widget
xmlns:rosie="http://schemas.android.com/apk/res/com.htc">
<style rosie:id="clockweather" rosie:label="@string/widget_weather_clock" rosie:description="@string/widget_detail" rosiereview="@drawable/preview_clock_weather" rosie:date="@string/simple_widget_date" rosie:name=".weatherclock.WeatherClockWidgetView" rosie:configure="com.htc.clock3dwidget/com.htc.clock3dwidget.setting.ConfigWeatherClock" rosie:span_x="4" rosie:span_y="2" />
<style rosie:id="clockweather41" rosie:label="@string/widget_weather_clock" rosie:description="@string/widget_detail" rosiereview="@drawable/preview_clock_weather_4x1" rosie:date="@string/simple_widget_date" rosie:name=".ClockWeather_4x1" rosie:configure="com.htc.clock3dwidget/com.htc.clock3dwidget.setting.ConfigWeatherClock" rosie:span_x="4" rosie:span_y="1" />
<style rosie:id="clockSocial" rosie:label="@string/widget_social_clock" rosie:description="@string/widget_detail" rosiereview="@drawable/preview_clock_social" rosie:date="@string/simple_widget_date" rosie:name=".socialclock.SocialClockWidgetView" rosie:span_x="4" rosie:span_y="2" />
<style rosie:id="clockDigital" rosie:label="@string/widget_digital_clock" rosie:description="@string/widget_detail" rosiereview="@drawable/preview_clock_digital" rosie:date="@string/simple_widget_date" rosie:name=".ClockDigital" rosie:configure="com.htc.clock3dwidget/com.htc.clock3dwidget.setting.ConfigDigitalClock" rosie:span_x="2" rosie:span_y="1" />
<style rosie:id="clockDual" rosie:label="@string/widget_dual_clock" rosie:description="@string/widget_detail" rosiereview="@drawable/preview_clock_dual" rosie:date="@string/simple_widget_date" rosie:name=".ClockDual" rosie:configure="com.htc.clock3dwidget/com.htc.clock3dwidget.setting.ConfigDualClock" rosie:span_x="4" rosie:span_y="2" />
<style rosie:id="clock03" rosie:label="@string/widget_analog_clock" rosie:description="@string/widget_detail" rosiereview="@drawable/preview_clock03" rosie:date="@string/simple_widget_date" rosie:name=".Clock03" rosie:configure="com.htc.clock3dwidget/com.htc.clock3dwidget.setting.ConfigAnalogClock" rosie:span_x="4" rosie:span_y="3" />
<style rosie:id="clock2x2" rosie:label="@string/widget_analog_clock" rosie:description="@string/widget_detail" rosiereview="@drawable/preview_clock2x2" rosie:date="@string/simple_widget_date" rosie:name=".Clock2x2" rosie:configure="com.htc.clock3dwidget/com.htc.clock3dwidget.setting.ConfigAnalogClock" rosie:span_x="2" rosie:span_y="2" />
<style rosie:id="clock04" rosie:label="@string/widget_analog_clock" rosie:description="@string/widget_detail" rosiereview="@drawable/preview_clock04" rosie:date="@string/simple_widget_date" rosie:name=".Clock04" rosie:configure="com.htc.clock3dwidget/com.htc.clock3dwidget.setting.ConfigAnalogClock" rosie:span_x="4" rosie:span_y="3" />
<style rosie:id="clock05" rosie:label="@string/widget_analog_clock" rosie:description="@string/widget_detail" rosiereview="@drawable/preview_clock05" rosie:date="@string/simple_widget_date" rosie:name=".Clock05" rosie:configure="com.htc.clock3dwidget/com.htc.clock3dwidget.setting.ConfigAnalogClock" rosie:span_x="4" rosie:span_y="3" />
<style rosie:id="clock06" rosie:label="@string/widget_analog_clock" rosie:description="@string/widget_detail" rosiereview="@drawable/preview_clock06" rosie:date="@string/simple_widget_date" rosie:name=".Clock06" rosie:configure="com.htc.clock3dwidget/com.htc.clock3dwidget.setting.ConfigAnalogClock" rosie:span_x="4" rosie:span_y="3" />
<style rosie:id="clock07" rosie:label="@string/widget_analog_clock" rosie:description="@string/widget_detail" rosiereview="@drawable/preview_clock07" rosie:date="@string/simple_widget_date" rosie:name=".Clock07" rosie:configure="com.htc.clock3dwidget/com.htc.clock3dwidget.setting.ConfigAnalogClock" rosie:span_x="4" rosie:span_y="3" />
<style rosie:id="clock08" rosie:label="@string/widget_analog_clock" rosie:description="@string/widget_detail" rosiereview="@drawable/preview_clock08" rosie:date="@string/simple_widget_date" rosie:name=".Clock08" rosie:configure="com.htc.clock3dwidget/com.htc.clock3dwidget.setting.ConfigAnalogClock" rosie:span_x="4" rosie:span_y="3" />
<style rosie:id="clock09" rosie:label="@string/widget_analog_clock" rosie:description="@string/widget_detail" rosiereview="@drawable/preview_clock09" rosie:date="@string/simple_widget_date" rosie:name=".Clock09" rosie:configure="com.htc.clock3dwidget/com.htc.clock3dwidget.setting.ConfigAnalogClock" rosie:span_x="4" rosie:span_y="3" />
<style rosie:id="clock10" rosie:label="@string/widget_analog_clock" rosie:description="@string/widget_detail" rosiereview="@drawable/preview_clock10" rosie:date="@string/simple_widget_date" rosie:name=".Clock10" rosie:configure="com.htc.clock3dwidget/com.htc.clock3dwidget.setting.ConfigAnalogClock" rosie:span_x="4" rosie:span_y="3" />
<style rosie:id="clockBeam" rosie:label="@string/widget_beam_clock" rosie:description="@string/widget_detail" rosiereview="@drawable/preview_clock_beam" rosie:date="@string/simple_widget_date" rosie:name=".ClockBeam" rosie:configure="com.htc.clock3dwidget/com.htc.clock3dwidget.setting.ConfigAnalogClock" rosie:span_x="4" rosie:span_y="3" />
<style rosie:id="clockRing" rosie:label="@string/widget_ring_clock" rosie:description="@string/widget_detail" rosiereview="@drawable/preview_clock_ring" rosie:date="@string/simple_widget_date" rosie:name=".ClockRing" rosie:configure="com.htc.clock3dwidget/com.htc.clock3dwidget.setting.ConfigAnalogClock" rosie:span_x="4" rosie:span_y="3" />
<style rosie:id="clockSpinCycle" rosie:label="@string/widget_spin_cycle_clock" rosie:description="@string/widget_detail" rosiereview="@drawable/preview_clock_spin_cycle" rosie:date="@string/simple_widget_date" rosie:name=".ClockSpinCycle" rosie:configure="com.htc.clock3dwidget/com.htc.clock3dwidget.setting.ConfigAnalogClock" rosie:span_x="4" rosie:span_y="3" />
<style rosie:id="clock1x1" rosie:label="@string/widget_analog_clock" rosie:description="@string/widget_detail" rosiereview="@drawable/preview_clock1x1" rosie:date="@string/simple_widget_date" rosie:name=".Clock1x1" rosie:configure="com.htc.clock3dwidget/com.htc.clock3dwidget.setting.ConfigAnalogClock" rosie:span_x="1" rosie:span_y="1" />
</rosie-widget>
Click to expand...
Click to collapse
In my case I want to use the smaller newer clock (but any can do depending on which clock you want
to use) which is found on this line:
<style rosie:id="clockweather41" rosie:label="@string/widget_weather_clock" rosie:description="@string/widget_detail" rosiereview="@drawable/preview_clock_weather_4x1" rosie:date="@string/simple_widget_date" rosie:name=".ClockWeather_4x1" rosie:configure="com.htc.clock3dwidget/com.htc.clock3dwidget.setting.ConfigWeatherClock" rosie:span_x="4" rosie:span_y="1" />
Click to expand...
Click to collapse
The name of the clock widget I want to use is found after 'rosie:name' which is ".ClockWeather_4x1".
So for "widget_name" I use "package_name"+'rosie:name' which makes it
'com.htc.clock3dwidget.ClockWeather_4x1'
For 'provider_name' that's a bit more difficult but after trial and error I found that it is
found in 'AndroidManifest.xml' of the clock widget on the line
<receiver android:label="@string/clock_widget_provider_label" android:icon="@drawable/clock" android:name="com.htc.clock3dwidget.ClockWidgetProvider" android:exported="true">
Click to expand...
Click to collapse
so 'provider_name' is 'android:name' before 'android:exported' which is
'com.htc.clock3dwidget.ClockWidgetProvider'
This becomes
<item name="package_name">com.htc.clock3dwidget</item>
<item name="widget_name">com.htc.clock3dwidget.ClockWeather_4x1</item>
<item name="provider_name">com.htc.clock3dwidget.ClockWidgetProvider</item>
Click to expand...
Click to collapse
'cell_x' and 'cell_y' remain untouched because I want it at the top of the screen starting
from the left (you place it where you want using cell_x and cell_y). 'span_x' stays at '4'
(because it occupies 4 cells going to the left) but 'span_y' becomes '1' because it occupies
1 cell going down. The clock widget settings section finally becomes
<set name="plenty">
<!--2a59290f-8da8-4eba-a246-27a5df7c6246-->
<item name="package_name">com.htc.clock3dwidget</item>
<item name="widget_name">com.htc.clock3dwidget.ClockWeather_4x1</item>
<item name="provider_name">com.htc.clock3dwidget.ClockWidgetProvider</item>
<item name="screen">3</item>
<item name="cell_x">0</item>
<item name="cell_y">0</item>
<item name="span_x">4</item>
<item name="span_y">1</item>
</set>
Click to expand...
Click to collapse
And that's just for the clock widget. The format is more or less the same for the other widgets. By the way, if you mess up the widget won't show but the widget itself won't be affected so you can manually add it. You will notice there are settings for other widgets that don't show up on any of the screens.
Oh, I think the process works the same for all phones as long as they have HTC Sense. If anyone has any questions please please please feel free to ask. We are all here to learn. I added bookmarks widget to replace friendstream widget which I don't need and re-added weather widget to first the first screen, shifted navigation widget and fellow widgets to last screen and added htc notes widget to their screen. The power is in your hands. As I said before, I couldn't find the information I needed anywhere so I had to hunt it down in the files mentioned above using my hunch and I found it. Whatever you want or need the answers are out there, you just need to find them
I have attached some screenshots. You might notice there's nothing special to them because you can change them after installing your ROM but that's how my screens look when I install my ROM so I don't have to change them anymore.
Many many thanks go to
football
mike1986
robocik, capychimp
baadnewz
dsixda
hawke84
faux123, sebastianfm
apktool guy
and many others from back in the days of wm2003
Since you already opened the default.xml file you might as well scroll a little further down and you will come this section
<module name="Browser">
<function name="bookmark">
Click to expand...
Click to collapse
That is the section with the default bookmarks for the bookmarks widget so you can add and remove sites so they come up by default. This section looks like this by default
<module name="Browser">
<function name="bookmark">
<set name="plenty">
<!--%%File%%-->
<item name="title">HTC</item>
<item name="url">http://www.htc.com</item>
</set>
<set name="plenty">
<!--%%File%%-->
<item name="title">Google</item>
<item name="url">http://www.google.com</item>
</set>
<set name="plenty">
<!--%%File%%-->
<item name="title">Yahoo!</item>
<item name="url">http://www.yahoo.com</item>
</set>
<set name="plenty">
<!--%%File%%-->
<item name="title">Wiki</item>
<item name="url">http://www.wikipedia.org</item>
</set>
<set name="plenty">
<!--%%File%%-->
<item name="title">Twitter</item>
<item name="url">http://twitter.com</item>
</set>
<set name="plenty">
<!--%%File%%-->
<item name="title">Facebook</item>
<item name="url">http://www.facebook.com</item>
</set>
<set name="plenty">
<!--%%File%%-->
<item name="title">AccuWeather</item>
<item name="url">http://www.accuweather.com/m/default.aspx?p=htcand&loc</item>
</set>
<set name="plenty">
<!--%%File%%-->
<item name="title">Lonely Planet</item>
<item name="url">http://www.lonelyplanet.com</item>
</set>
Click to expand...
Click to collapse
I added xdadevelopers to the list but you can add more if you want or remove some too.
Had another look at that ...system\customise\mns\default.xml. Looks like the '<function name="1_fx_widgets">' section up to '<function name="5_fx_widgets">' are the scenes for the scene picker part of hts sense. Even further down are the default apps that come with each scene. All you have to do is add or change your widgets, take screenshots, add screenshots to '...\system\customise\resource\' folder, fiddle with the naming then jump into the default.xml file and take it from there. Will update as I keep testing on my phone. God help this phone, lol.
reserved for even more info
merci beaucoup, monsieur can use this for future plans
, thanks for posting it!
Hi, can you show how to enable chinese input on HTC IME?
seadersn said:
merci beaucoup, monsieur can use this for future plans
, thanks for posting it!
Click to expand...
Click to collapse
M head's pounding right now considering I have already flashed my phoned about 9 times in the past 4 hours trying to get other widgets to work by default at first boot but thanks very much for the post seadersn. I'll update it a bit more because even with this info I am a bit confused myself, lol.
hengmy said:
Hi, can you show how to enable chinese input on HTC IME?
Click to expand...
Click to collapse
hi hengmy. I am sorry I cannot help at the moment but I guess one of the other hardened developers can. Thanks for asking anyway
ok, let's have a deeper look into it. maybe i will find some time today for playing with this, too; but first: dentist ;( i hope i'm able to do anything today after massacre's over...
Right, for anybody interested, I have edited my guide a little bit more and it's a little clearer now. The guide is basically for anyone who cooks ROMs and wants to add default widgets to any of the screens rather than the widgets HTC puts on the screens. Also if you remove some widgets from your ROM you will be left with blank screens so you can use those screens to add other widgets that are still in the ROM.
seadersn said:
ok, let's have a deeper look into it. maybe i will find some time today for playing with this, too; but first: dentist ;( i hope i'm able to do anything today after massacre's over...
Click to expand...
Click to collapse
Hi seadersn. Hope your trip to the dentist went ok . I redid the guide and I hope you can make some good use out of it. Any questions you have I'll try to answer but for now stay strong my friend.
thx, thx tomorrow and friday are next dentist visits longer taking thingy; replacement of three teethes
tmr is wednesday? kk, will start my testimonials in thursday: head / brain should be free then i'll contact you; i thought that there have to be a 'master index file' for that. if, then it will be found by us
gn8, maestro
well good luck with the dentist. but getting three teeth out, you must be a hero, lol. last time i went to the dentist was about 15yrs ago. i'd rather somebody punch my teeth out, lol.
anyway, from the way i see things i think those may be the 'master index files' for the default widget placement when cooking your roms. of course you can change them back. i had got fed up with changing my widgets everytime i flashed my phone so the quest began. so now i can get widgets of my choosing onto screens of my choosing before i cook and flash my rom. so it's not really something special but will come in handy for a chef. imagine cooking your own rom and having one of those fancy analogue clocks come up by default when you install your rom (of course you can change it back) and maybe a whole set of settings widgets on, hmm, maybe the last screen, for example? and that's how you might like it but how about those become your default screens for your custom roms?
i was fed of hanging around in the shadows for so many years, lol. and again, good luck with the dentist. remember to drink loads of water
I just use sqlite editor to get widget values from favourites in HTC launch database. Easy peezy lemon sqeezey
Sent from my HTC Sensation using xda premium
richmondo said:
I just use sqlite editor to get widget values from favourites in HTC launch database. Easy peezy lemon sqeezey
Sent from my HTC Sensation using xda premium
Click to expand...
Click to collapse
thank richmondo. will try and look into that . right now i am continuously scratching my head to get some of the widgets to show up and all the scrolling up and down and copy-pasting stuff is doing my head in, lol. wld love to find an easier method
nice
Hope the mods find this and move it to chef central.
Does seem to work on all HTC phones.
This is an awesome reference thread.
Well done.
Rob
other languages
hengmy said:
Hi, can you show how to enable chinese input on HTC IME?
Click to expand...
Click to collapse
Not sure of input as this may require a library added to the keyboard of choice; however, languages are added fairly simply ASSUMING you use a WWE base rom. You just add the language and country code into the default.xml in the CID folder. Example WFS has their latest and greatest called the Euro... Well it has lots of English choices but not for the US; so a bit of copying.. then edit your copy set to en_US et voila it will show up (and set up if chosen) upon factory reset. Language always fist two digit code and in lowercase; Country 2nd set and in caps.
Now sometimes I should warn a rom may use multiple CID setup profiles if so you could spy it in the /resouce/ccinfo.txt file. I would advise knocking out the multiples and setting it to default unless you just feel like complicating your life. Logic path is build.prop to ccinfo.txt to the various default.xml's (which then often have external carrier .xmls referenced in UI strings) and a root of customize directory file which has build number and whatnot [verification purposes mostly]. After that, your own your own, but understanding the logic path helps me not go insane
Now... Speaking of keyboards, how you guys figure the "short" name to add lessay Hacker's Keyboard, my personal fav generic in mns default.xml.. other keyboard names are indeed short; so I'm kinda guessing its not the package name.
Sidenote to change input in some if not most keyboards you dl the appropriate language library... Hacker's has many, and swype the spacebar, add the lib in the input settings et voila. Cooking that in however... Still learning.
TIA,
Rob
I was wondering if someone could tweak this app to show a hidden setting, I've looked into several XML files in this APK and I can see that in the Global Settings the setting to Enable 3G/4G but when you use the program and go into the settings it is hidden, the Disable HD Purchase warning does show.
I'm hoping if someone can tweak this and re-sign the APK I can use it to view videos over cell connection! Thanks for you help
default_settings.xml
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:id="@id/PreferenceScreen"
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="@string/settings_general_section" android:key="general_settings">
<CheckBoxPreference android:title="@string/bypass_hd_notice" android:key="bypass_HD_Notice" android:summary="@string/bypass_hd_summary" />
<CheckBoxPreference android:title="@string/bypass_wifi_notice" android:key="bypass_Wifi_Notice" android:summary="@string/bypass_wifi_summary" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/settings_info_section">
<Preference android:enabled="false" android:title="@string/deviceID" android:key="deviceID" />
<Preference android:enabled="false" android:title="@string/version_notice" android:key="buildNum" android:summary="unknown" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/settings_account_section" android:key="account_settings" />
</PreferenceScreen>
No such luck huh? well can anyone give me any hints as to how to make this happen?
Is anyone looking into it?
ive been looking into this too, there seems to be a lot of hidden settings on the app, havent had much luck though.
Hey Guys,
I am currently running the latest CM7.2 nightly by maniac103 on my Motorola Defy.
CM7 usually has a special modified Nexus One Torch integrated, whose packagename is "net.cactii.flash2".
As I would like to assign a torch-toggle to a slider in widgetlocker, I need the torch-app to provide a shortcut/activity since it only offers a toggle-widget.
I am talking about the app-specific shortcuts not the shortcuts that directly link to an app.
EDIT: The reason why I haven't put this in Q&A is that this is hopefully going to be a mod, so it may save the mods some time for not needing to push it to another forum...
I may have already found out that the receiver the torch uses is called "net.cactii.flash2.TorchSwitch" and the intent it expects is "net.cactii.flash2.TOGGLE_FLASHLIGHT".
I am not sure though, if I got this whole Intent-/Receiver-thingy right... Any corrections are appreciated.
From this tutorial I have learnt, that apps provide these shortcut-entries in their AndroidManifest.xml. I should be able to modify, recompile and sign this apk.
I just don't know exactly, how I have to add this to the AndroidManifest.xml in terms of syntax and language. That's where I need help...
EDIT: Here's the code of the AndroidManifest.xml for quick review:
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="10" android:versionName="2.3.7" package="net.cactii.flash2"
xmlns:android="http://schemas.android.com/apk/res/android">
<application android:label="@string/app_name" android:icon="@drawable/icon">
<activity android:label="@string/app_name" android:name=".MainActivity" android:launchMode="singleTask" android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".WidgetOptionsActivity">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
</intent-filter>
</activity>
<receiver android:label="Torch" android:name="TorchWidgetProvider">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<action android:name="net.cactii.flash2.TORCH_STATE_CHANGED" />
</intent-filter>
<meta-data android:name="android.appwidget.provider" android:resource="@xml/appwidget_info" />
</receiver>
<service android:name=".TorchService" android:enabled="true" />
<receiver android:label="@string/app_name" android:name="TorchSwitch" android:enabled="true">
<intent-filter>
<action android:name="net.cactii.flash2.TOGGLE_FLASHLIGHT" />
</intent-filter>
</receiver>
</application>
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.flash" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
</manifest>
Before you tell me now, that I should use a different flashlight-app: I was already using TeslaLED which runs well with WidgetLocker.
However, the in-built torch offers a high brightness-mode that I want to use. Additionally, TeslaLED always needs 2-3 seconds to activate the flashlight, unlike Torch, which usually toggles instantly...
I have appended the torch-apk, as well as the AndroidManifest.xml I want to modify.
Here is an additional link (from another dev), which shows shortly, how the torch app works together with a statusbar-toggle, if that helps in any way...
Summary of what is needed: A mod for net.cactii.flash2's AndroidManifest.xml which provides a high brightness flashlight toggle-shortcut
If you potentially know how to write this short piece of code and you just want to know how android handles these shortcuts, please read this tutorial. It's very short and helpful.
EDIT: It seems that we have to modify the app as well, not just the AndroidManifest.xml, because it would place a shortcut in the menu, but Torch wouldn't know what to do when I select this item. Feel free to post your ideas and/or corrections
EDIT: Alternatively we could try to make Torch listen to TeslaLED's intents, but I think that would be more sophisticated and could lead to problems, when both apps are installed...
Thanks for any help in advance!
Greetz, Unr3aL67
Unr3aL67 said:
"net.cactii.flash2.TOGGLE_FLASHLIGHT"
Click to expand...
Click to collapse
thanks!
I used this line in Tasker with Send Intent to toggle Torch on my CM10.2.
Gawis said:
thanks!
I used this line in Tasker with Send Intent to toggle Torch on my CM10.2.
Click to expand...
Click to collapse
Okay, I'm using tasker to make a widget via power toggles... I used the same line in tasker, and it works great! Here's what I'm wondering now...
In power toggles, with regular toggles, you can have the icon change colors, say it would be green when the flashlight is on, and gray when off... Obviously you can't do that by just sending the intent, so anyone have any ideas about how to do this?
I know power toggles uses Tesla by default, but I don't like the delay.. Torch is on immediately, so thats what I want to use.
Any ideas would be greatly appreciated!
Gawis said:
thanks!
I used this line in Tasker with Send Intent to toggle Torch on my CM10.2.
Click to expand...
Click to collapse
Okay, I figured it out... The following task, paired with power toggles, works great! The button is off when the light is off, and the button is in the "Active" state when the light is on.. For mine its Gray when the light is off, and Green when the light is on....
If %Toggle ~ 1
Send Intent
Action net.cactii.flash2.TOGGLE_FLASHLIGHT
Variable Set
Name %Toggle To 0
Else
Send Intent
Action net.cactii.flash2.TOGGLE_FLASHLIGHT
Variable Set
Name %Toggle To 1
End If
Modify PowerToggle state
Configuration Set current toggle to off
If %Toggle ~ 0
Modify PowerToggle state
Configuration Set current toggle to on
If %Toggle ~ 1
Hope this helps someone figure this out! LOL! If it helped you, please thumbs up... Too busy to be on XDA all the time....