Market on 2.2 Sylvania/Disco - Work In Progress

I decompiled Settings.apk, it's pretty obvious "Security Settings" was completely ripped out. Not much location-related seems messed with in framework.jar, so it might be possible to enable Wifi Locations by just pushing over the stock Settings.apk or enable it via a db update.
 
Tried but failed to make any difference when I attempted pushing stock Settings.apk & SettingsProvider.apk. It did change db entry however, no affect on location aware applications. Also attempted to test Mock locations setting under Applications with no affect as well.

1st time sent from my MiniTab using Android Tablet Forum.
 
Another thought - I noticed that the tablet's prefs has a bunch of its own .smali files named Ethernet*. Since we would be depending on Wifi to get location, I wonder if they customized the Wifi and broke Location-based services in doing so?
 
I wonder if they customized the Wifi and broke Location-based services in doing so?

Somethings broke, just where? I pulled the Settings.apk and SettingsProvider.apk from the sdk and replaced the DG2.20 versions on the device. This restored "Location & security" in the Settings menu.

Clicking the "Use wireless networks" checkbox did add the value "network" to the "secure' table in
/data/data/com.android.providers.settings/setting.db.

Code:
_id    name                       value
##    location_providers_allowed    network
However, nothing was registered in the logcat.

Checking the "Use GPS satellites" checkbox added the value "gps" to the table.


Code:
_id    name                       value
##    location_providers_allowed    gps,network
It also registered "Failed to enable location provider" in the logcat file.

Code:
I/======================>WindowManager( 2048): force=false top=Window{45e6e0d8 com.android.settings/com.android.settings.SecuritySettings paused=false}
I/ActivityManager( 2048): Displayed activity com.android.settings/.SecuritySettings: 383 ms (total 383 ms)
V/======================>WindowManager( 2048): finishLayoutLw::mHideKeyguard=false [COLOR=blue]< Clicking on the "Use wireless networks" checkbox numerous times, nothing being registered in the log.[/COLOR]
I/dalvikvm( 2145): Jit: resizing JitTable from 2048 to 4096
D/dalvikvm( 2145): GC_FOR_MALLOC freed 4983 objects / 459696 bytes in 78ms
[B]W/GpsLocationProvider( 2048): Failed to enable location provider[/B] [COLOR=blue]< Clicking "Use GPS satellites"[/COLOR]
D/SntpClient( 2048): request time failed: java.net.SocketException: Address family not supported by protocol
W/GpsLocationProvider( 2048): Failed to enable location provider [COLOR=blue]< Clicking again[/COLOR]
D/dalvikvm( 2048): GC_FOR_MALLOC freed 13222 objects / 809304 bytes in 113ms
W/GpsLocationProvider( 2048): Failed to enable location provider [COLOR=blue]< and again, and again ... on and off[/COLOR]
D/dalvikvm( 2145): GC_FOR_MALLOC freed 4394 objects / 458232 bytes in 68ms
W/GpsLocationProvider( 2048): Failed to enable location provider
D/dalvikvm( 2145): GC_FOR_MALLOC freed 4517 objects / 462784 bytes in 60ms
W/GpsLocationProvider( 2048): Failed to enable location provider 
W/GpsLocationProvider( 2048): Failed to enable location provider 
W/GpsLocationProvider( 2048): Failed to enable location provider
W/GpsLocationProvider( 2048): Failed to enable location provider
W/GpsLocationProvider( 2048): Failed to enable location provider
D/dalvikvm( 2145): GC_FOR_MALLOC freed 4522 objects / 462856 bytes in 63ms
W/GpsLocationProvider( 2048): Failed to enable location provider
So what happened to "W/NetworkLocationProvider"?

Also, missing from the settings.db that was in the DG2.01 version is this line -

Code:
_id    name                      value
##    use_location            1
Adding it in manually has made no affect on locations working. Where to look?

This is what we need to find - frameworks/ base/ services/ java/ com/ android/ server/ LocationManagerService.java

Code:
 * The service class that manages LocationProviders and issues location
 * updates and alerts.
 *
 * {@hide}
 */
public class LocationManagerService extends ILocationManager.Stub implements Runnable {
    private static final String TAG = "LocationManagerService";
    private static final boolean LOCAL_LOGV = false;

    // The last time a location was written, by provider name.
    private HashMap<String,Long> mLastWriteTime = new HashMap<String,Long>();

    private static final String ACCESS_FINE_LOCATION =
        android.Manifest.permission.ACCESS_FINE_LOCATION;
    private static final String ACCESS_COARSE_LOCATION =
        android.Manifest.permission.ACCESS_COARSE_LOCATION;
    private static final String ACCESS_MOCK_LOCATION =
        android.Manifest.permission.ACCESS_MOCK_LOCATION;
    private static final String ACCESS_LOCATION_EXTRA_COMMANDS =
        android.Manifest.permission.ACCESS_LOCATION_EXTRA_COMMANDS;
    private static final String INSTALL_LOCATION_PROVIDER =
        android.Manifest.permission.INSTALL_LOCATION_PROVIDER;
 
Last edited:
Somethings broke, just where? I pulled the Settings.apk and SettingsProvider.apk from the sdk and replaced the DG2.20 versions on the device. This restored "Location & security" in the Settings menu.

Clicking the "Use wireless networks" checkbox did add the value "network" to the "secure' table in
/data/data/com.android.providers.settings/setting.db.

Code:
_id    name                       value
##    location_providers_allowed    network
However, nothing was registered in the logcat.

Checking the "Use GPS satellites" checkbox added the value "gps" to the table.


Code:
_id    name                       value
##    location_providers_allowed    gps,network
It also registered "Failed to enable location provider" in the logcat file.

Code:
I/======================>WindowManager( 2048): force=false top=Window{45e6e0d8 com.android.settings/com.android.settings.SecuritySettings paused=false}
I/ActivityManager( 2048): Displayed activity com.android.settings/.SecuritySettings: 383 ms (total 383 ms)
V/======================>WindowManager( 2048): finishLayoutLw::mHideKeyguard=false [COLOR=blue]< Clicking on the "Use wireless networks" checkbox numerous times, nothing being registered in the log.[/COLOR]
I/dalvikvm( 2145): Jit: resizing JitTable from 2048 to 4096
D/dalvikvm( 2145): GC_FOR_MALLOC freed 4983 objects / 459696 bytes in 78ms
[B]W/GpsLocationProvider( 2048): Failed to enable location provider[/B] [COLOR=blue]< Clicking "Use GPS satellites"[/COLOR]
D/SntpClient( 2048): request time failed: java.net.SocketException: Address family not supported by protocol
W/GpsLocationProvider( 2048): Failed to enable location provider [COLOR=blue]< Clicking again[/COLOR]
D/dalvikvm( 2048): GC_FOR_MALLOC freed 13222 objects / 809304 bytes in 113ms
W/GpsLocationProvider( 2048): Failed to enable location provider [COLOR=blue]< and again, and again ... on and off[/COLOR]
D/dalvikvm( 2145): GC_FOR_MALLOC freed 4394 objects / 458232 bytes in 68ms
W/GpsLocationProvider( 2048): Failed to enable location provider
D/dalvikvm( 2145): GC_FOR_MALLOC freed 4517 objects / 462784 bytes in 60ms
W/GpsLocationProvider( 2048): Failed to enable location provider 
W/GpsLocationProvider( 2048): Failed to enable location provider 
W/GpsLocationProvider( 2048): Failed to enable location provider
W/GpsLocationProvider( 2048): Failed to enable location provider
W/GpsLocationProvider( 2048): Failed to enable location provider
D/dalvikvm( 2145): GC_FOR_MALLOC freed 4522 objects / 462856 bytes in 63ms
W/GpsLocationProvider( 2048): Failed to enable location provider
So what happened to "W/NetworkLocationProvider"?

Also, missing from the settings.db that was in the DG2.01 version is this line -

Code:
_id    name                      value
##    use_location            1
Adding it in manually has made no affect on locations working. Where to look?

This is what we need to find - frameworks/ base/ services/ java/ com/ android/ server/ LocationManagerService.java

Code:
 * The service class that manages LocationProviders and issues location
 * updates and alerts.
 *
 * {@hide}
 */
public class LocationManagerService extends ILocationManager.Stub implements Runnable {
    private static final String TAG = "LocationManagerService";
    private static final boolean LOCAL_LOGV = false;

    // The last time a location was written, by provider name.
    private HashMap<String,Long> mLastWriteTime = new HashMap<String,Long>();

    private static final String ACCESS_FINE_LOCATION =
        android.Manifest.permission.ACCESS_FINE_LOCATION;
    private static final String ACCESS_COARSE_LOCATION =
        android.Manifest.permission.ACCESS_COARSE_LOCATION;
    private static final String ACCESS_MOCK_LOCATION =
        android.Manifest.permission.ACCESS_MOCK_LOCATION;
    private static final String ACCESS_LOCATION_EXTRA_COMMANDS =
        android.Manifest.permission.ACCESS_LOCATION_EXTRA_COMMANDS;
    private static final String INSTALL_LOCATION_PROVIDER =
        android.Manifest.permission.INSTALL_LOCATION_PROVIDER;

That would be in services.jar. I should have just requested them all :)

Though I will finally be able to pick up mine tomorrow from USPS. I heard CVS somehow lied about the version though(?)
 
Yes, if you ordered from CVS online with the 25% off deal last week you will get an Express tablet, it will not have HDMI/etc. I got mine today.
 
See this video for a fix for the "no matching" error on the initial market screen, version 1.82. Still no paid apps, but all the free ones show and are searchable!

 
Last edited by a moderator:
Did you use gmail to set up your account so you get an android_id? DL unsuccessful is one of the symptoms of no android ID.
 
Works! I can now see all free apps and they install perfectly for me. No paid apps, however my previous purchased apps (from my phone) show up in downloads. Warning, do not update the youtube app, crashes when launching. Still would like to get location and security settings restored. Thanks!
 
Managed to get all gapps installed, just need locale.... all gapps working perfect except no paid apps in market, no gps for maps or navigation. However, when i installed them, it made twitter stop working.....
 
I have tried this mutliple times. I can see everything, but can not download anything. I did use Gmail to create my account and I tried using my account I have setup from my phone (which does work on my phone).
 
I can see everything, but can not download anything.

Here are a few things to try -

A) If you're having trouble getting the Android Market to work, regardless of what firmware your running, this might fix it! It also allowed Market to update to the latest version but only after fixed B) below.

Go to Settings/Applications/Manage Applications
Press Menu/ filter/All

1. Checkin Service -clear data
2. Download Manager -clear data
3. Market -clear cache
4. Reboot

B) If you can download other applications but Market does not update, check the Permissions and Properties of /cache. These changes might be overly permissive but it allowed files to download and install. Previously the file "download.apk" would just be stuck in the folder.
Code:
$su
#
#chmod 777 /cache
#
#chown root.root /cache
#reboot
C) For whatever reason, the "android_id" is in located/referenced in two different databases.

One location is - /data/data/com.android.providers.settings/databases/settings.db in the "secure" table. It's a HEX value.

The other is - /data/data/com.google.android.gsf/gservices.db in the "main" table. This is a Decimal representation of the "android_id".

Are they the same values? This site has tools to convert between HEX and DEC. If not, try replacing with your "ugly hack" "android_id" and ensure they are the same value in HEX and DEC. If you need the steps to replace manually, that would be another discussion.

This is why this is a Work In Progress and Not a How To

========================
Investigation of "android_id" in "secure" table in "settings.db" using SQLiteStudio
$settings.db.jpg


Note: Still working on why the "android_id" is defined twice however, it would make sense that they should match.

A guess - One is is populated each time the device is factory reset as it may be provided by the partner to allow Gmail to work. Is this the one in HEX starting with 977xxxxxxxxxx?

Once replaced with the one created with the emulator for the "ugly hack" on 2.01 which started with 322xxxx and using it's Decimal value in the other location, "Free" applications are displayed and download.
 
Last edited:
Back
Top