opengapps / aosp_build

AOSP Build system compatible version of Open GApps
GNU General Public License v3.0
317 stars 155 forks source link

App availability in Play Store #36

Closed fonic closed 8 years ago

fonic commented 8 years ago

I don't think this is an actual issue with OpenGApps, but I think this is the right place to ask so I give it a try.

I integrated OpenGApps in my AOSP build for Play Store support. But when I run my build on the target device (hardware very similar to Nexus 5x), only very few apps show up in the Play Store and most of them are marked as 'incompatible with your device'

I tried several how-tos which describe this problem, I tried to alter the build.prop, cleared the caches of Play Services and Play Store but there's no change at all.

What am I missing?

mfonville commented 8 years ago

Often such problems are related if the framework is not correctly set; especially if the dpis are faulty. Altering build.prop or clearing caches do not fix this, because the capabilities are registered when the device is being registered to Google Play Services/Google Framework(login) the first time.

fonic commented 8 years ago

You got me wrong there. I applied the changes before the first boot, thus before the first login of Play Store. Still, no effect.

From logcat I learned the restrictions have the ID 9 (hardware not compatible).

Any ideas?

mfonville commented 8 years ago

@fonic that is the same error as when a framework is faulty. But I don't know anything about the aosp_build process itself, so probably @Blystad would be more suited to help with the debugging of the faulty install.

acr92 commented 8 years ago

Hardware not compatible....Hmm....

Try running:

adb shell pm list features

And compare the output between a Nexus 5X and your device, and see if that points to anything.

fonic commented 8 years ago

Thanks! This is what I get:

feature:reqGlEsVersion=0x30000
feature:android.hardware.bluetooth
feature:android.hardware.bluetooth_le
feature:android.hardware.ethernet
feature:android.hardware.screen.landscape
feature:android.hardware.screen.portrait
feature:android.hardware.usb.accessory
feature:android.hardware.wifi
feature:android.software.app_widgets
feature:android.software.backup
feature:android.software.live_wallpaper
feature:android.software.webview
feature:com.google.android.feature.EXCHANGE_6_2
feature:com.google.android.feature.GOOGLE_BUILD
feature:com.google.android.feature.GOOGLE_EXPERIENCE

The question is, what should I get. Sadly, I don't have a Nexus 5x to compare.

acr92 commented 8 years ago
feature:reqGlEsVersion=0x20000
feature:android.hardware.audio.low_latency
feature:android.hardware.audio.output
feature:android.hardware.bluetooth
feature:android.hardware.bluetooth_le
feature:android.hardware.camera
feature:android.hardware.camera.any
feature:android.hardware.camera.autofocus
feature:android.hardware.camera.flash
feature:android.hardware.camera.front
feature:android.hardware.faketouch
feature:android.hardware.location
feature:android.hardware.location.gps
feature:android.hardware.location.network
feature:android.hardware.microphone
feature:android.hardware.screen.landscape
feature:android.hardware.screen.portrait
feature:android.hardware.sensor.accelerometer
feature:android.hardware.sensor.compass
feature:android.hardware.sensor.gyroscope
feature:android.hardware.sensor.light
feature:android.hardware.sensor.proximity
feature:android.hardware.telephony
feature:android.hardware.telephony.gsm
feature:android.hardware.touchscreen
feature:android.hardware.touchscreen.multitouch
feature:android.hardware.touchscreen.multitouch.distinct
feature:android.hardware.touchscreen.multitouch.jazzhand
feature:android.hardware.usb.accessory
feature:android.hardware.usb.host
feature:android.hardware.wifi
feature:android.hardware.wifi.direct
feature:android.software.app_widgets
feature:android.software.backup
feature:android.software.connectionservice
feature:android.software.device_admin
feature:android.software.home_screen
feature:android.software.input_methods
feature:android.software.live_wallpaper
feature:android.software.managed_users
feature:android.software.print
feature:android.software.sip
feature:android.software.sip.voip
feature:android.software.voice_recognizers
feature:android.software.webview
feature:com.google.android.feature.EXCHANGE_6_2
feature:com.google.android.feature.GOOGLE_BUILD
feature:com.google.android.feature.GOOGLE_EXPERIENCE

Here is what I get on the device my company produces. It's similar to a Galaxy Nexus.

fonic commented 8 years ago

Hm. Is there any way I could debug what exactly the Play Store thinks why an App is incompatible?

From the two lists, I could only image

feature:android.hardware.faketouch
feature:android.hardware.location
feature:android.hardware.touchscreen
feature:android.software.home_screen
feature:android.software.input_methods

would cause a problem, the others seem to specific. Maybe I just set the whole list using an XML file to test if that changes anything.

mfonville commented 8 years ago

I can tell you that feature:android.hardware.touchscreen is obligatory for >99% of the apps...

fonic commented 8 years ago

Compiling a new build with those features as we speak, let's see if that does the trick.

acr92 commented 8 years ago

You could use some APK downloader and use aapt or something to check the manifest for what features the apps require.

fonic commented 8 years ago

I think we're on the right track. I did this for Mozilla Firefox, this is the snippet from the manifest regarding features:

    E: uses-feature (line=85)
      A: android:name(0x01010003)="android.hardware.location" (Raw: "android.hardware.location")
      A: android:required(0x0101028e)=(type 0x12)0x0
    E: uses-feature (line=86)
      A: android:name(0x01010003)="android.hardware.location.gps" (Raw: "android.hardware.location.gps")
      A: android:required(0x0101028e)=(type 0x12)0x0
    E: uses-feature (line=87)
      A: android:name(0x01010003)="android.hardware.touchscreen" (Raw: "android.hardware.touchscreen")
    E: uses-permission (line=91)
      A: android:name(0x01010003)="android.permission.SYSTEM_ALERT_WINDOW" (Raw: "android.permission.SYSTEM_ALERT_WINDOW")
    E: uses-permission (line=94)
      A: android:name(0x01010003)="android.permission.NFC" (Raw: "android.permission.NFC")
    E: uses-feature (line=95)
      A: android:name(0x01010003)="android.hardware.nfc" (Raw: "android.hardware.nfc")
      A: android:required(0x0101028e)=(type 0x12)0x0
    E: uses-permission (line=97)
      A: android:name(0x01010003)="android.permission.RECORD_AUDIO" (Raw: "android.permission.RECORD_AUDIO")
    E: uses-feature (line=98)
      A: android:name(0x01010003)="android.hardware.audio.low_latency" (Raw: "android.hardware.audio.low_latency")
      A: android:required(0x0101028e)=(type 0x12)0x0
    E: uses-feature (line=99)
      A: android:name(0x01010003)="android.hardware.camera.any" (Raw: "android.hardware.camera.any")
      A: android:required(0x0101028e)=(type 0x12)0x0
    E: uses-feature (line=100)
      A: android:name(0x01010003)="android.hardware.microphone" (Raw: "android.hardware.microphone")
      A: android:required(0x0101028e)=(type 0x12)0x0
    E: uses-permission (line=101)
      A: android:name(0x01010003)="android.permission.CAMERA" (Raw: "android.permission.CAMERA")
    E: uses-feature (line=102)
      A: android:name(0x01010003)="android.hardware.camera" (Raw: "android.hardware.camera")
      A: android:required(0x0101028e)=(type 0x12)0x0
    E: uses-feature (line=103)
      A: android:name(0x01010003)="android.hardware.camera.autofocus" (Raw: "android.hardware.camera.autofocus")
      A: android:required(0x0101028e)=(type 0x12)0x0
    E: uses-feature (line=106)
      A: android:glEsVersion(0x01010281)=(type 0x11)0x20000
      A: android:required(0x0101028e)=(type 0x12)0xffffffff
fonic commented 8 years ago

Success!! The two of you are my heros! Here's what I did.

Using adb, I pushed a file named custom_features.xml to /system/etc/permissions with the following content:

<?xml version="1.0" encoding="utf-8"?>
<permissions>
    <feature name="android.hardware.faketouch" />
    <feature name="android.hardware.touchscreen" />
    <feature name="android.software.home_screen" />
    <feature name="android.hardware.location" />
    <feature name="android.hardware.location.network" />
    <feature name="android.hardware.location.gps" />
    <feature name="android.software.input_methods" />
</permissions>

Now almost all apps show up and can be downloaded/installed. I have yet to find out which features are really necessary, but as mfonville suggested, android.hardware.touchscreen is probably the most important.

Many thanks, this helps me a lot - what use is an Android system without apps...!

acr92 commented 8 years ago

Great, glad to be of assistance :smile: