How to tell if a package is burned in versus updateable?

by DulcetTone » Thu, 06 Jan 2011 11:07:23 GMT


Sponsored Links
 Is there no means by which you can tell whether a package installed on
the phone is burned in with the firmware (and hence immutable) versus
one that can be updated?

On a similar line, why does Google ever put apps on the Market with
the same signature by which they are burned into some phones?  It
stunts updating terribly.  Indeed, why burn any apps on the phone as
opposed to make them super-easy to find in a dynamic manner?

tone


-- 



Re: How to tell if a package is burned in versus updateable?

by Dianne Hackborn » Thu, 06 Jan 2011 11:19:26 GMT


 



ApplicationInfo.FLAG_SYSTEM.

This doesn't really mean it is immutable; you can install an update to it if
it is signed with the same cert (though the update is placed on the data
partition like other third party apps, since /system is read only).



Huh?  You can update built-in apps, as per above.  This is how maps updates
have been delivered for a long time, as well as Market updates (which you
aren't generally aware of), more recently Gmail updates, etc.

-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 


Sponsored Links


Re: How to tell if a package is burned in versus updateable?

by DulcetTone » Thu, 20 Jan 2011 00:29:01 GMT


 




Ok... is this update then read and used instead of the original /
system copy?  I assume so.


This is not the case with my phones.  I suppose this must be a
consequence of the fact that their firmware was written to from a burn
station in Google's own offices here in Cambridge.   I cannot, for
instance, update Google Maps -- it downloads the update and fails to
install every time.

I assumed the issue extended to other users' phones.

tone

-- 



Re: Re: How to tell if a package is burned in versus updateable?

by Dianne Hackborn » Thu, 20 Jan 2011 03:32:09 GMT


 



Yes, it hides the .apk that is still in the system image.  If you
"uninstall" it, you revert to the built-in system version.


This is not the case with my phones.  I suppose this must be a

If you are getting builds from internally at Google, you should probably not
be talking about them on a public forum.  Just sayin'. :)



No, production devices have .apks signed with final certs.

-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 



Other Threads

1. How to play a audio resource on Hero?

These phones are killing me with exceptions while running the same
trivial code that works on other phones, in which I play a short mp3
file packed as a raw resource.  This is the only MediaPlayer use in my
app, so I am sure not exhausting any limits on number of such items.

Here is the code that works on most Android phones and not on at least
SOME Hero/Eris.
What can/should I be doing differently?

// often (always?) returns null on Hero/Eris when called from within
my app's main activity
MediaPlayer mp = MediaPlayer.create(this, resId);
mp.start(); // this will just crash on a Hero/Eris, as mp will be null

// ditto... returns null and I do not know why
mp = MediaPlayer.create(getBaseContext(), resId);

**I have no Hero or Eris on which to test**, and so further detail is
difficult to obtain.

I also tried the following code after some other dev opined that Hero/
Eris had trouble playing audio resources.  I copy the resource out to
a file and then just get another error.

mp = new MediaPlayer();
copyResourceToFile(resId, "foo.mp3");
mp.setDataSource(fname);
mp.prepare();   // fails on java.io.IOException: Prepare failed.:
status=0x1

Could this be an unsupported codec (it's a 4 second mp3 for crying out
loud, exported from Audacity)?  Should I try a PCM encoded wav file?

I would love some data from those who have actually done this on Hero/
Eris.  I suspect any "well, this should work" answers will fail just
as mine have.

tone

--

2. Insert Content in MediaStore.Audio.Media.EXTERNAL_CONTENT_URI

Hello.

I get an error if I use this simple code:

       import android.provider.MediaStore.Audio.Media;
     // Save the name and description of an image in a ContentValues
map.
        ContentValues values = new ContentValues(3);
        values.put(Media.DISPLAY_NAME, "road_trip_1");
        values.put(Media.TITLE, "Day 1, trip to Los Angeles");
        values.put(Media.MIME_TYPE, "audio/mp3");

        // Add a new record without the bitmap, but with the values
just set.
        // insert() returns the URI of the new record.
        Uri uri = getContentResolver().insert
(Media.EXTERNAL_CONTENT_URI, values);

The error I get is on the last code line:
Writing exception to parcel
java.lang.NullPointerException
  at com.android.providers.media.MediaProvider.insertInternal
(MediaProvider.java:1286)
  at com.android.providers.media.MediaProvider.insert
(MediaProvider.java:1193)
(...)


But, when I insert a new image entry instead of an audio entry I get
no error!
(import android.provider.MediaStore.Images.Media; instead of
android.provider.MediaStore.Audio.Media; would work, but I need to
insert a audio file)

--

3. Keyboard/view layout issue

4. Layout - Is there some way to do wraparound with horizontal linear layout

5. Very new - need some help.

6. Android Virtual Device manager freezing upon creation

7. Update Tab-Content when clicking Tab