I had some problems with my Android phone and had to do a factory reset. After this it was not possible for me to install my application I am developing.
Searching in logcat i found:
ERROR/Vold(62): ASEC file '/mnt/secure/asec/smdl2tmp1.asec'
currently exists - destroy it first! (No such file or directory)
ERROR/Vold(62): ASEC file '/mnt/secure/asec/smdl2tmp1.asec'
currently exists - destroy it first! (Address already in use)
WARN/Vold(62): Returning OperationFailed - no handler for errno 98
ERROR/PackageHelper(587): Failed to create secure container smdl2tmp1
ERROR/DefContainer(587): Failed to create container smdl2tmp1
After some more googling I found this this issue at google code.
In this thread I found a link to the this page where I found the comment:
/mnt/secure is the directory where secure containers holding apps installed
on SD card get mounted. On the SD card, they appear as a single file, under
something like .android_secure
So apparently this file is a temp file that should have been removed by the system at some point, but weren’t.
I mounted my phone on my computer and removed the file
.android_secure/smdl2tmp1.asec
This solved my problems and now I can install my applications again.
Posted by Rickard Lindroth on Nov 16, 2010
I was struggling with an error when trying to copy files from a Windows server to the mounted Linux client.
All i got was the error Error
0x8007048F: The device is not connected
After some looking around i found out that this is due to a known bug that had at the time of when i am writing this not been fixed.
Bug 2022945
But there is a patch that fixes this,
Patch
And another guy who made a patched tar ball that you can compile and use.
Patch by spotzero
Posted by Rickard Lindroth on Apr 19, 2010
I had som problem hiding the mouse cursor in Actionscript.
Just to putting Mouse.hide() in my initialize method for the main component did not work.
private function init():void {
Mouse.hide();
}
After some hair pulling I tried this which work.
private function init():void {
this.addEventListener(MouseEvent.ROLL_OVER, onMouseRollOver, false, 0, true);
}
public function onMouseRollOver(event:Event):void {
Mouse.hide();
}
This adds an event listener for the event MouseEvent.ROLL_OVER This event happens every time the mouse cursor rolls over the component. When this happens the onMouseRollOver function is called which hides the cursor with Mouse.hide()
If you only want to hide the cursor for one component in your application you have to add a event handler for the MouseEvent.ROLL_OUT event. Then add a handler for that event that unhides the cursor again with Mouse.show()
private function init():void {
this.addEventListener(MouseEvent.ROLL_OVER, onMouseRollOver, false, 0, true);
this.addEventListener(MouseEvent.ROLL_OUT, onMouseRollOut, false, 0, true);
}
public function onMouseRollOver(event:Event):void {
Mouse.hide();
}
public function onMouseRollOut(event:Event):void {
Mouse.show();
}
If you are one of those that are wondering over all the extra arguments to addEventListener be sure to read this article.
Posted by Rickard Lindroth on Jan 19, 2010
Today when I was going to bed I realized that I had forgotten my mobile phone at work. This is my only alarm and the only way I will wake up at time. I knew that I could set up a cron job that would start some program playing an mp3, but I wanted something simpler. After searching around the net for a while I found the command “at”. This commands only purpose is to do something at a given time.
> at 07:30 tomorrow
at> mpg321 awesome_morning_music.mp3
Hit CTRL-D to finish “at”
This would start playing the mp3 at 7:30 in the morning tomorrow. If you don’t use military (24h) time, AM and PM is fine too. It’s also possible to use dates.
If the at daemon is not running you will get at warning about this. If this is the case, simply start it.
On an Arch System:
> /etc/rc.d/atd start
On an Debian/Ubuntu System:
> /etc/init.d/atd start
Posted by Rickard Lindroth on Dec 04, 2009
I had some problems finding how to make the rows in my python GTK application to change colors every even, odd, row.
After a lot of head scratching i found the answer “set-rules-hint”. This is not a Style Property, which is difficult to set, but a normal Property. You can use the function set_property("set-rules-hint",True) or the
set_rules_hint(True) function to enable this.
If the name of the TreeView in your Glade file is “treeview”
tree_view = self.builder.get_object("treeview")
tree_view.set_rules_hint(True)
Something to consider is that this is only a hint to the theme manager that we prefer every odd row in another color. It’s up to the Theme manager to follow this. So if this does not work for you, try with changing your theme.
Posted by Rickard Lindroth on Oct 25, 2009