I'm trying to build a Phone+Wear app with NativeScript for Android. I have been able to build both separately and to run them on the Android emulator also. The problem is that I'm unable to package them properly, I mean, I can't package them together in order to install only one APK, that will install the handheld app in the phone and push the wearable app into the watch.
Method and code
Even the post you wrote about Android Wear is quite outdated and the sample code repo is missing, I have been able to build a NativeScript app which APK runs properly in an Android Wear emulator.
I have also a normal phone app built with NativeScript that runs properly in the emulator and in my own device (described bellow).
I have tried to package the app following the steps described by the official documentation in the sections: "Signing the wearable and handheld app separately" and "Package Manually". I have tried both packaging methods but no one is working for me (the last one is also the one described in this post).
Bellow you can see the AndroidManifest.xml and app.gradle files of both applications and the commands that I'm executing to package the signed app:
Wearable App Files
bilbonbizi/wearable/package.json
"nativescript": {
"id": "com.berriart.bilbonbizi",
"tns-android": {
"version": "2.5.0"
}
},
bilbonbizi/wearable/app/App_Resources/Android/AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="__PACKAGE__"
android:versionCode="1"
android:versionName="1.0">
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"/>
<uses-sdk
android:minSdkVersion="20"
android:targetSdkVersion="__APILEVEL__"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-feature android:name="android.hardware.location.gps" />
<uses-feature android:name="android.hardware.location.network" />
<uses-feature android:name="android.hardware.type.watch" />
<application
android:name="com.tns.NativeScriptApplication"
android:allowBackup="true"
android:icon="#drawable/icon"
android:label="#string/app_name"
android:theme="#android:style/Theme.DeviceDefault">
<activity
android:name="com.tns.NativeScriptActivity"
android:label="#string/title_activity_kimera"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="#style/LaunchScreenTheme">
<meta-data android:name="SET_THEME_ON_LAUNCH" android:resource="#style/AppTheme" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.tns.ErrorReportActivity"/>
</application>
</manifest>
bilbonbizi/wearable/app/App_Resources/Android/app.gradle
dependencies {
compile 'com.google.android.support:wearable:+'
}
android {
defaultConfig {
generatedDensities = []
applicationId = "com.berriart.bilbonbizi"
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
}
Handled App Files
bilbonbizi/wearable/package.json
"nativescript": {
"id": "com.berriart.bilbonbizi",
"tns-android": {
"version": "2.5.0"
}
},
bilbonbizi/handheld/app/App_Resources/Android/AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="__PACKAGE__"
android:versionCode="1"
android:versionName="1.0">
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"/>
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="__APILEVEL__"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-feature android:name="android.hardware.location.gps" />
<uses-feature android:name="android.hardware.location.network" />
<uses-feature android:name="android.hardware.type.watch" />
<application
android:name="com.tns.NativeScriptApplication"
android:allowBackup="true"
android:icon="#drawable/icon"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<meta-data android:name="com.google.android.wearable.beta.app"
android:resource="#xml/wearable_app_desc"/>
<activity
android:name="com.tns.NativeScriptActivity"
android:label="#string/title_activity_kimera"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait"
android:theme="#style/LaunchScreenTheme">
<meta-data android:name="SET_THEME_ON_LAUNCH" android:resource="#style/AppTheme" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.tns.ErrorReportActivity"/>
<service android:name="com.mapbox.mapboxsdk.telemetry.TelemetryService" />
</application>
</manifest>
bilbonbizi/handheld/app/App_Resources/Android/app.gradle
android {
defaultConfig {
generatedDensities = []
applicationId = "com.berriart.bilbonbizi"
}
aaptOptions {
additionalParameters "--no-version-vectors"
noCompress "apk"
}
}
bilbonbizi/handheld/app/App_Resources/Android/xml/wearable_app_desc.xml
<wearableApp package="com.berriart.bilbonbizi">
<versionCode>1</versionCode>
<versionName>1.0</versionName>
<rawPathResId>wearable_app</rawPathResId>
</wearableApp>
Steps to package the app (steps to reproduce the issue)
The signing key used is the same for both:
cd bilbonbizi/wearable
tns platform remove android && tns platform add android && tns prepare android
tns build android --release --key-store-path [hiddenpath] --key-store-password [hiddenpass] --key-store-alias [hiddenalias] --key-store-alias-password [hiddenpass] --copy-to ../handheld/app/App_Resources/Android/raw/wearable_app.apk
cd ../handheld
tns platform remove android && tns platform add android && tns prepare android
tns build android --release --key-store-path [hiddenpath] --key-store-password [hiddenpass] --key-store-alias [hiddenalias] --key-store-alias-password [hiddenpass] --copy-to ../bilbonbizi.apk
cd ..
adb install ./bilbonbizi.apk
After this, the app is properly installed in the phone but is not being pushed to the watch.
Output logs
adb logcat
02-07 20:39:24.600 28861 7360 I ActivityUpsampling: AR upsampling state transition NORMAL_STATE --> NORMAL_STATE, activity: unknown
02-07 20:39:24.625 28861 7360 I Fit:LocationProvider: Location recording changed to : STOP_HIGH_FIDELITY_RECORDING.
02-07 20:39:25.962 3553 3553 D powerUI : accValue============37
02-07 20:39:25.962 3553 3553 D powerUI : mCputempVlaue============37
02-07 20:39:27.965 3553 3553 D powerUI : accValue============41
02-07 20:39:27.965 3553 3553 D powerUI : mCputempVlaue============41
02-07 20:39:28.825 5372 5527 D ClClient: Not sending keepalive. Current connection state=STOPPED
02-07 20:39:29.968 3553 3553 D powerUI : accValue============42
02-07 20:39:29.968 3553 3553 D powerUI : mCputempVlaue============42
02-07 20:39:30.506 7351 7351 I dex2oat : dex2oat took 8.052s (threads: 4) arena alloc=3MB java alloc=5MB native alloc=25MB free=3MB
02-07 20:39:30.964 997 1050 V BackupManagerService: restoreAtInstall pkg=com.berriart.bilbonbizi token=18 restoreSet=35825bc48d1581dc
02-07 20:39:30.966 997 3469 D BackupManagerService: MSG_RUN_RESTORE observer=null
02-07 20:39:30.975 4181 27142 I Backup : [GmsBackupTransport] New restore session, 2 apps
02-07 20:39:31.127 4181 27142 W Conscrypt: Could not set socket write timeout: null
02-07 20:39:31.198 4181 27142 W Conscrypt: Could not set socket write timeout: null
02-07 20:39:31.399 4181 27142 I GmsBackupTransport: Http Response Code : 200
02-07 20:39:31.411 4181 11827 I Backup : [GmsBackupTransport] Current restore package : PackageInfo{ebff3de #pm#}
02-07 20:39:31.411 4181 11827 I Backup : [GmsBackupTransport] A key/value pairs restore
02-07 20:39:31.412 997 3469 D BackupManagerService: initiateOneRestore packageName=#pm#
02-07 20:39:31.446 997 3469 V BackupManagerService: No more packages; finishing restore
02-07 20:39:31.450 4181 6449 I Backup : [GmsBackupTransport] restore finished
02-07 20:39:31.453 997 3469 I BackupRestoreController: restoreFinished for 0
02-07 20:39:31.453 997 3469 I BackupManagerService: Restore complete.
02-07 20:39:31.455 997 1050 W Settings: Setting install_non_market_apps has moved from android.provider.Settings.Global to android.provider.Settings.Secure, returning read-only value.
02-07 20:39:31.456 997 1050 I art : Starting a blocking GC Explicit
02-07 20:39:31.687 997 1050 I art : Explicit concurrent mark sweep GC freed 192257(10MB) AllocSpace objects, 10(2MB) LOS objects, 33% free, 25MB/37MB, paused 2.673ms total 231.207ms
02-07 20:39:31.696 4764 4764 D BluetoothMapAppObserver: onReceive
02-07 20:39:31.696 4764 4764 D BluetoothMapAppObserver: The installed package is: com.berriart.bilbonbizi
02-07 20:39:31.700 4764 4764 D BluetoothMapAppObserver: Found 0 application(s) with intent android.bluetooth.action.BLUETOOTH_MAP_PROVIDER
02-07 20:39:31.703 4764 4764 D BluetoothMapAppObserver: Found 0 application(s) with intent android.bluetooth.action.BLUETOOTH_MAP_IM_PROVIDER
02-07 20:39:31.706 7337 7337 I art : System.exit called, status: 0
02-07 20:39:31.706 7337 7337 I AndroidRuntime: VM exiting with result code 0.
02-07 20:39:31.719 997 7064 W ActivityManager: Permission Denial: Accessing service ComponentInfo{com.google.android.music/com.google.android.music.dial.DialMediaRouteProviderService} from pid=6893, uid=1008$
that is not exported from uid 10065
02-07 20:39:31.722 7208 7364 D Documents: Update found 8 roots in 14ms
02-07 20:39:31.730 997 4095 W ActivityManager: Permission Denial: Accessing service ComponentInfo{com.google.android.music/com.google.android.music.dial.DialMediaRouteProviderService} from pid=12711, uid=1002
7 that is not exported from uid 10065
02-07 20:39:31.730 997 3363 I InputReader: Reconfiguring input devices. changes=0x00000010
02-07 20:39:31.802 7117 7117 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1221 android.content.ContextWrapper.startService:581 android.co
ntent.ContextWrapper.startService:581 com.bq.gallerybq.app.PackagesMonitor.onReceive:40 android.app.ActivityThread.handleReceiver:2725
02-07 20:39:31.823 4108 4108 D CarrierServiceBindHelper: Receive action: android.intent.action.PACKAGE_ADDED
02-07 20:39:31.824 4108 4108 D CarrierServiceBindHelper: mHandler: 3
02-07 20:39:31.824 4108 4108 D CarrierConfigLoader: mHandler: 9 phoneId: 0
02-07 20:39:31.838 997 7064 I ActivityManager: Start proc 7371:com.google.android.partnersetup/u0a12 for broadcast com.google.android.partnersetup/.RlzPingBroadcastReceiver
02-07 20:39:31.891 7371 7371 W System : ClassLoader referenced unknown path: /system/priv-app/GooglePartnerSetup/lib/arm
02-07 20:39:31.970 3553 3553 D powerUI : accValue============39
02-07 20:39:31.970 3553 3553 D powerUI : mCputempVlaue============39
02-07 20:39:31.980 9247 9247 I Finsky : [1] com.google.android.finsky.wear.WearSupportService.a(307): Wear auto install disabled for package com.berriart.bilbonbizi
02-07 20:39:31.992 997 3623 I ActivityManager: Killing 6845:com.pushbullet.android/u0a118 (adj 15): empty #17
02-07 20:39:32.072 997 7067 D ActivityManager: cleanUpApplicationRecord -- 6845
02-07 20:39:32.116 9247 9247 I Finsky : [1] com.google.android.finsky.utils.PermissionPolicies$PermissionPolicyService.onStartCommand(115): post-install permissions check for com.berriart.bilbonbizi
02-07 20:39:32.117 3947 7369 I WearablePkgInstaller: Setting DataItem to install wearable apps for com.berriart.bilbonbizi
02-07 20:39:32.155 9247 9247 I Finsky : [1] com.google.android.finsky.utils.bd.run(2300): Package state data is missing for com.berriart.bilbonbizi
02-07 20:39:32.303 5372 5372 V ApplicationReceiver:onReceive: 2017-02-07 19:39:32-03f1a6a6-fd89-4d04-98ad-0967d0ad6a4f-Application install message is received ver:1.2.2
02-07 20:39:32.304 5372 5372 V ApplicationReceiver:onReceive: 2017-02-07 19:39:32-03f1a6a6-fd89-4d04-98ad-0967d0ad6a4f-ApplicationReceiver detectes the installation of package:com.berriart.bilbonbizi ver:1.2.2
02-07 20:39:32.351 6446 7009 I Icing : Usage reports 0 indexed 0 rejected 0 imm upload false
02-07 20:39:32.361 487 487 I MSM-irqbalance: Decided to move IRQ177 from CPU4 to CPU6
02-07 20:39:32.367 6446 7009 I Icing : Usage reports 0 indexed 0 rejected 0 imm upload false
02-07 20:39:32.375 6446 7401 W IcingInternalCorpora: getNumBytesRead when not calculated.
02-07 20:39:32.503 9247 9247 I Finsky : [1] com.google.android.finsky.wear.bc.onPostExecute(2601): Writing installed apps for account [9oegQYjV2A_lG13uYgoCCNs4Sr8]
02-07 20:39:32.714 4764 5061 D bt_btm_pm: btm_pm_snd_md_req switching from SNIFF to ACTIVE.
02-07 20:39:32.747 3947 4409 V WearableLS: bindService: com.google.android.wearable.app/com.google.android.clockwork.companion.DispatchingWearableListenerService
02-07 20:39:32.749 3947 4409 V WearableLS: unbindService: com.google.android.wearable.app/com.google.android.clockwork.companion.DispatchingWearableListenerService
02-07 20:39:32.795 3947 4409 V WearableLS: bindService: com.google.android.wearable.app/com.google.android.clockwork.companion.DispatchingWearableListenerService
02-07 20:39:32.798 3947 4409 V WearableLS: unbindService: com.google.android.wearable.app/com.google.android.clockwork.companion.DispatchingWearableListenerService
02-07 20:39:32.994 4764 5061 D bt_btm_pm: btm_pm_proc_mode_change switched from UNKNOWN to ACTIVE.
02-07 20:39:33.106 3947 7369 I WearablePkgInstaller: Setting DataItem to install wearable apps for com.berriart.bilbonbizi
02-07 20:39:33.148 3947 4409 V WearableLS: bindService: com.google.android.wearable.app/com.google.android.clockwork.companion.DispatchingWearableListenerService
02-07 20:39:33.151 3947 4409 V WearableLS: unbindService: com.google.android.wearable.app/com.google.android.clockwork.companion.DispatchingWearableListenerService
02-07 20:39:33.200 3947 4409 V WearableLS: bindService: com.google.android.wearable.app/com.google.android.clockwork.companion.DispatchingWearableListenerService
02-07 20:39:33.203 3947 4409 V WearableLS: unbindService: com.google.android.wearable.app/com.google.android.clockwork.companion.DispatchingWearableListenerService
02-07 20:39:33.270 9247 9639 I PlayCommon: [1735] com.google.android.play.a.g.e(909): Preparing logs for uploading
02-07 20:39:33.270 9247 9639 I PlayCommon: [1735] com.google.android.play.a.g.e(911): No file ready to send
02-07 20:39:33.372 6446 6714 I Icing : Indexing FDFCB9FA2CA9FD93DE9DD0B9F5797CCEABC83AD6 from com.google.android.gms
02-07 20:39:33.449 3947 4409 V WearableLS: bindService: com.google.android.wearable.app/com.google.android.clockwork.companion.DispatchingWearableListenerService
02-07 20:39:33.451 3947 4409 V WearableLS: unbindService: com.google.android.wearable.app/com.google.android.clockwork.companion.DispatchingWearableListenerService
02-07 20:39:33.509 6446 6714 I Icing : Indexing done FDFCB9FA2CA9FD93DE9DD0B9F5797CCEABC83AD6
02-07 20:39:33.974 3553 3553 D powerUI : accValue============36
02-07 20:39:33.974 3553 3553 D powerUI : mCputempVlaue============36
02-07 20:39:35.978 3553 3553 D powerUI : accValue============35
02-07 20:39:35.978 3553 3553 D powerUI : mCputempVlaue============35
02-07 20:39:37.360 487 487 I MSM-irqbalance: Decided to move IRQ130 from CPU4 to CPU6
02-07 20:39:37.982 3553 3553 D powerUI : accValue============35
02-07 20:39:37.982 3553 3553 D powerUI : mCputempVlaue============35
02-07 20:39:38.455 3947 4409 V WearableLS: bindService: com.google.android.wearable.app/com.google.android.clockwork.companion.DispatchingWearableListenerService
02-07 20:39:38.457 3947 4409 V WearableLS: unbindService: com.google.android.wearable.app/com.google.android.clockwork.companion.DispatchingWearableListenerService
I have pasted a long log in order to provide as much info as possible, but probably the most relevant logs are: (picked from above)
BluetoothMapAppObserver: The installed package is: com.berriart.bilbonbizi
CarrierServiceBindHelper: Receive action: android.intent.action.PACKAGE_ADDED
Finsky : [1] com.google.android.finsky.wear.WearSupportService.a(307): Wear auto install disabled for package com.berriart.bilbonbizi
Finsky : [1] com.google.android.finsky.utils.PermissionPolicies$PermissionPolicyService.onStartCommand(115): post-install permissions check for com.berriart.bilbonbizi
WearablePkgInstaller: Setting DataItem to install wearable apps for com.berriart.bilbonbizi
Finsky : [1] com.google.android.finsky.utils.bd.run(2300): Package state data is missing for com.berriart.bilbonbizi
ApplicationReceiver:onReceive: 2017-02-07 19:39:32-03f1a6a6-fd89-4d04-98ad-0967d0ad6a4f-Application install message is received ver:1.2.2
ApplicationReceiver:onReceive: 2017-02-07 19:39:32-03f1a6a6-fd89-4d04-98ad-0967d0ad6a4f-ApplicationReceiver detectes the installation of package:com.berriart.bilbonbizi ver:1.2.$
WearablePkgInstaller: Setting DataItem to install wearable apps for com.berriart.bilbonbizi
It's being extremely difficult for me to find information and understand the following log line:
Wear auto install disabled for package com.berriart.bilbonbizi
And also it is really strange to find the following line taking into account that I didn't change any version number and the one written in the manifest is 1.0:
the installation of package:com.berriart.bilbonbizi ver:1.2.$
Devices Information
PC
tns --version
# 2.5.0
cat /etc/lsb-release
# DISTRIB_ID=Ubuntu
# DISTRIB_RELEASE=16.10
# DISTRIB_CODENAME=yakkety
# DISTRIB_DESCRIPTION="Ubuntu 16.10"
tns-core-modules: "2.5.0"
tns-android: "2.5.0"
Phone
BQ Aquaris M5 (Android 6.0.1)
SmartWatch
Sony Smartwatch 3 (Compilation Number M1D64T)
Question
As I said, when the final APK is built and installed on a phone the wearable app is not being pushed to the connected watch. Is there anything wrong in the code/steps described above?
Let me know if I can help you by providing more information.
it could be useful to see the build.gradle files of your modules (both phone and weareable ones).
Also, you did not specify if you are trying to build an Android Wear App for Android Wear 2.0. I suppose you only need the Android Wear 1.x weareable app, since those are the only one that can be installed automatically over the air when installing the app on the handset.
In order for it to work correctly, your build.gradle file of the handset module should contains these dependencies:
dependencies {
...
compile 'com.google.android.gms:play-services-wearable:10.0.1'
compile 'com.android.support:support-compat:25.1.0'
wearApp project(':wearable')
...
}
Doing this you should normally just build and sign the handset apk
Related
In the AndroidManifest.xml of my app I specified a target API to 26:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.javasrv"
android:minSdkVersion="23"
android:targetSdkVersion="26"
android:versionCode="6"
android:versionName="1.0.0">
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
But when I am running the app on Android x86 8.1 and disabling the permission for storage access through system menu it says that "This app was designed for an older version of Android. Denying permission may cause it to no longer function as intended."
How can it be?
Also I am having a problem with runtime permissions check: it always deems that the access is granted even though I disabled it in the system settings:
if (ContextCompat.checkSelfPermission(LoaderActivity.this, permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
Toast.makeText(LoaderActivity.this, "PERMISSION_DENIED", Toast.LENGTH_SHORT).show();
Log.d("*** Loader::onCreate ***", "PERMISSION_DENIED");
if (ActivityCompat.shouldShowRequestPermissionRationale(this, permission.WRITE_EXTERNAL_STORAGE)) {
} else {
}
ActivityCompat.requestPermissions(this, new String[]{permission.WRITE_EXTERNAL_STORAGE}, 0);
} else {
Toast.makeText(LoaderActivity.this, "PERMISSION_GRANTED", Toast.LENGTH_SHORT).show();
Log.d("*** Loader::onCreate ***", "PERMISSION_GRANTED");
}
Again, it is unclear how can it be. Any ideas?
Edit: I am using android api v26 and android support library v23.
The compilation script:
file=javasrv.apk
# export CLASSPATH=/opt/android-sdk/platforms/android-26/android.jar:/opt/android-sdk/extras/android/support-library/23.2.1/android-support-v4.jar
#
rm -f com/javasrv/*.class
javac -cp $CLASSPATH -source 1.8 -target 1.8 com/javasrv/*.java
#dx --dex --output classes.dex com/javasrv/*.class
dx --dex --output classes.dex com/javasrv/*.class android/support/v4/app/*.class android/support/v4/content/*.class
#aapt package -f -m -F "$file" -M AndroidManifest.xml -S res -I "$CLASSPATH"
#aapt add "$file" classes.dex
rm -rf build && mkdir build
find ./res -type f | grep -vE '\.sw.$' | xargs -I{} aapt2 compile -o build "{}" --no-crunch
aapt2 link -R build/* --manifest AndroidManifest.xml $(echo "$CLASSPATH" | tr -d '\n' | xargs -d':' -L1 -I{} echo " -I {} ") -o "$file" --auto-add-overlay
zip -uj "$file" classes.dex
zipalign -f 4 "$file" "$file.aligned"
mv -f "$file.aligned" "$file"
apksigner sign --ks-pass pass:pwd --ks javasrv.keystore "$file"
Edit2: Here is another may be related to this one problem concerning aapt2. If I specify compileSdkVersion in AndroidManifest.xml it throws an error:
AndroidManifest.xml:2: error: attribute android:compileSdkVersion not found.
error: failed processing manifest.
I simply ignored it by removing compileSdkVersion from the manifest. I wonder now if I should not...
Edit3: As related to logcat of that permission check. I only have access to /data/log.txt. But it should be enough. No?
08-16 19:24:39.236 18965 18965 E /system/bin/webview_zygote32: Failed to make and chown /acct/uid_99182: Permission denied
08-16 19:24:39.236 18965 18965 E Zygote : createProcessGroup(99182, 0) failed: Permission denied
08-16 19:24:39.239 2219 2900 I am_proc_start: [0,18965,99182,com.android.chrome:sandboxed_process0,webview_service,com.javasrv/org.chromium.content.app.SandboxedProcessService0]
08-16 19:24:39.239 2219 2900 I ActivityManager: Start proc 18965:com.android.chrome:sandboxed_process0/u0i182 for webview_service com.javasrv/org.chromium.content.app.SandboxedProcessService0
08-16 19:24:39.255 18965 18965 W /system/bin/webview_zygote32: Unexpected CPU variant for X86 using defaults: x86_64
08-16 19:24:39.256 18931 18931 I auditd : type=1400 audit(0.0:3392): avc: denied { read } for comm="com.javasrv" name="vmstat" dev="proc" ino=4026531858 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=1
08-16 19:24:39.256 18931 18931 I com.javasrv: type=1400 audit(0.0:3392): avc: denied { read } for name="vmstat" dev="proc" ino=4026531858 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=1
08-16 19:24:39.256 18931 18931 I auditd : type=1400 audit(0.0:3393): avc: denied { open } for comm="com.javasrv" path="/proc/vmstat" dev="proc" ino=4026531858 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=1
08-16 19:24:39.256 18931 18931 I com.javasrv: type=1400 audit(0.0:3393): avc: denied { open } for path="/proc/vmstat" dev="proc" ino=4026531858 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=1
08-16 19:24:39.263 18959 18959 W zygote : Unexpected CPU variant for X86 using defaults: x86_64
08-16 19:24:39.281 1022 1022 I auditd : type=1400 audit(0.0:3395): avc: denied { read } for comm="loop0" path="/mnt/android-8.1-r2/system.img" dev="vda2" ino=1422631 scontext=u:r:kernel:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=1
08-16 19:24:39.281 1022 1022 I loop0 : type=1400 audit(0.0:3395): avc: denied { read } for path="/mnt/android-8.1-r2/system.img" dev="vda2" ino=1422631 scontext=u:r:kernel:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=1
08-16 19:24:39.289 2671 2691 D SubscriptionController: [getPhoneId] asked for default subId=-1
08-16 19:24:39.290 2671 2691 D SubscriptionController: [getSubId]- invalid slotIndex=-1
08-16 19:24:39.336 18931 18931 D *** Loader::onCreate ***: PERMISSION_GRANTED
08-16 19:24:39.336 18931 18931 D *** getListFiles ***: [W]/sdcard/Download/FDroid.apk
08-16 19:24:39.336 18931 18931 D *** getListFiles ***: [W]/sdcard/Download/javasrv.apk
Edit4:
This is how the activity from which I am requesting permissions gets started:
Intent intent = new Intent(this, LoaderActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// If set in an Intent passed to Context.startActivity(), this flag will cause any existing task that would be associated with the activity to be cleared before the activity is started. That is, the activity becomes the new root of an otherwise empty task, and any old activities are finished. This can only be used in conjunction with FLAG_ACTIVITY_NEW_TASK.
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
startActivity(intent);
Edit 5:
Holy cow! I just decompiled the resulted apk and noticed that somehow my android:versionCode and android:versionName became platformbuildversioncode and platformbuildversionname respectively. This is nuts! I wonder how the hell it happened.
Added: Uh oh. It is somehow related to the version of aapt2. I used from build-tools 28.0.3. In changed it to 26.0.2 and it behaved without that insanity.
Edit 6:
Due to the bugs with aapt2, I reverted back to aapt. At least it doesn't messing up the manifest too much:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:minSdkVersion="23" android:targetSdkVersion="26" package="com.javasrv" platformBuildVersionCode="26" platformBuildVersionName="8.0.0">
For some reason it excised my app custom version number and version code though. But at least that should not affect the work of an app.
What I am still struggling with though is that I cannot specify compileSdkVersion due to the same error that compileSdkVersion was not found in the package android.
Edit 7: Alright. Here is the head of the manifest that I decompiled from the final apk(which I built with aapt2 v26):
<?xml version="1.0" encoding="utf-8" standalone="no"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" android:minSdkVersion="23" android:targetSdkVersion="26" package="com.javasrv">
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
So the only thing is missing is compileSdkVersion. I still can't figure out how to make aapt2 put that value into the manifest. But I tested that apk and the bug with runtime permissions still persist. Very strange.
Edit 8:
Installed the latest aapt2 version. From here: https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2/3.6.0-alpha11-5720371/aapt2-3.6.0-alpha11-5720371-linux.jar
Still the same thing - it would not insert compileSdkVersion.
Edit 9:
Actually it is pretty clear that compiledSdkVersion isn't present in the namespace I am using. I also cannot find it anywhere in the docs: https://developer.android.com/guide/topics/manifest/uses-sdk-element
It appears to me that I should not use it at all - and actually I don't see any purpose in it. Who the hell cares with what version I compiled my app, if I can just specify the minimum and target versions? So the bug should be somewhere else.
Edit 10:
Updated up to 24.1.1 version of Android Support Library. Stilll no luck with the check of runtime permissions.
Edit 11:
Tried to call requestPermissions even though it falsily detects it as GRANTED and got a runtime error: that classs android.support.v4.app.ActivityCompatApi23 was not found. Interesting...
Hm. Apparently I should've used Android Support Library the same version as my SDK. But it is unclear for me how to get a jar of the latest version of a support library (see Install latest android support library CLI )
So yeah. Probably it was a bad idea just to extract the jar file from 24.1.1's aar - apparently it wasn't the whole library but just a patch. So I decided to use jar 23.2.1 which some guy compiled: https://github.com/pbakondy/cordova-plugin-android-support-v4-jar
Edit 12:
With v23.2.1 android support library back in place I decided to call requestPermissions right after I called Log.d with PERMISSION_GRANTED message. Here is the output:
08-17 12:50:15.132 28837 28837 D *** Loader::onCreate ***: PERMISSION_GRANTED
08-17 12:50:15.136 28837 28891 I com.javasrv: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
08-17 12:50:15.139 2219 2600 I ActivityManager: START u0 {act=android.content.pm.action.REQUEST_PERMISSIONS pkg=com.google.android.packageinstaller cmp=com.google.android.packageinstaller/com.android.packageinstaller.permission.ui.GrantPermissionsActivity (has extras)} from uid 10081
08-17 12:50:15.141 2219 2600 I wm_task_moved: [179,1,6]
08-17 12:50:15.142 2219 2600 I am_create_activity: [0,28890900,179,com.google.android.packageinstaller/com.android.packageinstaller.permission.ui.GrantPermissionsActivity,android.content.pm.action.REQUEST_PERMISSIONS,NULL,NULL,8388608]
08-17 12:50:15.147 2219 2600 I am_pause_activity: [0,43511476,com.javasrv/.LoaderActivity]
08-17 12:50:15.182 2446 2446 V StatusBar: setLightsOn(true)
08-17 12:50:15.183 28837 28837 I am_on_resume_called: [0,com.javasrv.LoaderActivity,LAUNCH_ACTIVITY]
08-17 12:50:15.254 28837 28873 W cr_media: Requires BLUETOOTH permission
08-17 12:50:15.273 28837 28837 I am_on_paused_called: [0,com.javasrv.LoaderActivity,handlePauseActivity]
08-17 12:50:15.284 2219 2259 I am_restart_activity: [0,28890900,179,com.google.android.packageinstaller/com.android.packageinstaller.permission.ui.GrantPermissionsActivity]
08-17 12:50:15.285 2219 2259 I am_set_resumed_activity: [0,com.google.android.packageinstaller/com.android.packageinstaller.permission.ui.GrantPermissionsActivity,minimalResumeActivityLocked]
08-17 12:50:15.291 2219 2298 I sysui_count: [window_time_0,3]
08-17 12:50:15.291 2219 2298 I sysui_multi_action: [757,803,799,window_time_0,802,3]
08-17 12:50:15.297 2446 2446 V StatusBar: setLightsOn(true)
08-17 12:50:15.304 2219 5022 I am_finish_activity: [0,28890900,179,com.google.android.packageinstaller/com.android.packageinstaller.permission.ui.GrantPermissionsActivity,app-request]
08-17 12:50:15.305 2219 5022 I am_pause_activity: [0,28890900,com.google.android.packageinstaller/com.android.packageinstaller.permission.ui.GrantPermissionsActivity]
08-17 12:50:15.308 2219 2298 I sysui_count: [window_time_0,0]
08-17 12:50:15.308 2219 2298 I sysui_multi_action: [757,803,799,window_time_0,802,0]
08-17 12:50:15.439 2219 2259 I am_set_resumed_activity: [0,com.javasrv/.LoaderActivity,resumeTopActivityInnerLocked]
08-17 12:50:15.446 2219 2259 I am_resume_activity: [0,43511476,179,com.javasrv/.LoaderActivity]
08-17 12:50:15.457 2219 2298 I sysui_count: [window_time_0,0]
08-17 12:50:15.457 2219 2298 I sysui_multi_action: [757,803,799,window_time_0,802,0]
08-17 12:50:15.557 2446 2446 I chatty : uid=10030(com.android.systemui) identical 5 lines
08-17 12:50:15.594 2446 2446 V StatusBar: setLightsOn(true)
No dialog appeared. It looks like the system makes the app think that the permission was granted.
I wonder why ... there must be something wrong with the manifest, but what?
I will output the whole manifest via apkanalyzer:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
android:minSdkVersion="23"
android:versionCode="6"
android:versionName="1.0.0"
android:targetSdkVersion="26"
package="com.javasrv">
<uses-permission
android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:label="#ref/0x7f060000"
android:icon="#ref/0x7f020000">
<activity
android:theme="#ref/0x010300f0"
android:label="#ref/0x7f060000"
android:name="com.javasrv.MainActivity">
<intent-filter>
<action
android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:theme="#ref/0x010300f0"
android:label="#ref/0x7f060000"
android:name="com.javasrv.LoaderActivity">
<intent-filter>
<action
android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:theme="#ref/0x01030011"
android:label="#string/0xb"
android:icon="#ref/0x7f010000"
android:name="com.javasrv.TestActivity"
android:screenOrientation="1">
<intent-filter>
<action
android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<service
android:name=".MyTestService" />
<service
android:name=".MyJobService"
android:permission="android.permission.BIND_JOB_SERVICE" />
<receiver
android:name="Boot">
<intent-filter
android:priority="100">
<action
android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
</application>
</manifest>
Any ideas?
THE PROBLEM HAS BEEN SOLVED
May be this can help you.
Just make your in your app gradle you have compileSdkVersion and targetSdkVersion as 26.
If checkpermission is not working you can try the dialog permission
When your app receives PERMISSION_DENIED from checkSelfPermission(), you need to prompt the user for that permission. Android provides several methods you can use to request a permission, such as requestPermissions().
ActivityCompat.requestPermissions(this,
new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
1);
Then override the method
#Override
public void onRequestPermissionsResult(int requestCode, #NonNull String[] permissions, #NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
switch (requestCode) {
case 1: {
// If request is cancelled, the result arrays are empty.
if (grantResults.length > 0
&& grantResults[0] == PackageManager.PERMISSION_GRANTED) {
// permission was granted
} else {
// permission denied
Toast.makeText(BiggerScreen.this, "Permission denied to write your External storage", Toast.LENGTH_SHORT).show();
}
return;
}
// other 'case' lines to check for other
// permissions this app might request
}
}
Wow. All that time the problem was with AndroidManifest.xml. I specified minSdkVersion in the wrong place. I should've done that in uses-sdk xml tag, not in manifest tag, just like on the Android Developer website is written: https://developer.android.com/guide/topics/manifest/uses-sdk-element
I don't know where I picked up an idea that these attributes should be written in manifest tag. Perhaps this is what gradle is doing - it transfers the attributes when compiling the apk..
Edit: In addition, one have to restart the app after permission has been granted. Otherwise, checkSelfPermission will inform that acccess has been granted, but the app will not have any access to the files: Writing external storage doesn't work until I restart the application on Android M
I have problem with Android O HIDL. The failure log shows it can't find out the service.
However I can see it by adb shell ps -A | grep fingerprint
system 18758 1 17408 3276 pipe_wait 7c79e93e08 R android.hardware.biometrics.fingerprint#2.1-service`
Could anyone give me a hint how to solve the problem? I checked https://source.android.com/devices/architecture/hidl/ but could not get the solution.
Error log:
08-21 06:00:35.864 1890 2264 V FingerprintService: mDeamon was null, reconnect to fingerprint
08-21 06:00:35.864 1890 2264 I system_server: Looking for service android.hardware.biometrics.fingerprint#2.1::IBiometricsFingerprint/default
08-21 06:00:35.864 2240 2240 D wpa_supplicant: nl80211: Set mode ifindex 24 iftype 2 (STATION)
08-21 06:00:35.866 566 566 W /system/bin/hwservicemanager: getTransportFromManifest: Cannot find entry android.hardware.biometrics.fingerprint#2.1::IBiometricsFingerprint in either framework or device manifest, using default transport.
08-21 06:00:35.866 1890 2264 E system_server: service android.hardware.biometrics.fingerprint#2.1::IBiometricsFingerprint declares transport method EMPTY but framework expects hwbinder.
08-21 06:00:35.867 1890 2264 E FingerprintService: Failed to get biometric interface
08-21 06:00:35.867 1890 2264 E FingerprintService: android.os.RemoteException: HwBinder Error: (-2147483648)
08-21 06:00:35.867 1890 2264 E FingerprintService: at android.os.HwBinder.getService(Native Method)
08-21 06:00:35.867 1890 2264 E FingerprintService: at android.hardware.biometrics.fingerprint.V2_1.IBiometricsFingerprint.getService(IBiometricsFingerprint.java:44)
08-21 06:00:35.867 1890 2264 E FingerprintService: at com.android.server.fingerprint.FingerprintService.getFingerprintDaemon(FingerprintService.java:239)
08-21 06:00:35.867 1890 2264 E FingerprintService: at com.android.server.fingerprint.FingerprintService$FingerprintServiceWrapper.isHardwareDetected(FingerprintService.java:1198)
08-21 06:00:35.867 1890 2264 E FingerprintService: at android.hardware.fingerprint.IFingerprintService$Stub.onTransact(IFingerprintService.java:156)
08-21 06:00:35.867 1890 2264 E FingerprintService: at android.os.Binder.execTransact(Binder.java:674)
08-21 06:00:35.867 1890 2264 W FingerprintService: fingerprint HIDL not available
I've succeeded in running my fingerprint HAL on Android 8.1 executing on HiKey
96 board after modified files as below.
Firstly, it's necessary that adding HIDL configures to declare a device as a vendor or you would get VTS failed.
About HIDL configures
device/linaro/hikey/manifest.xml
+<hal format="hidl">
<name>android.hardware.biometrics.fingerprint</name>
<transport>hwbinder</transport>
<version>2.1</version>
<interface>
<name>IBiometricsFingerprint</name>
<instance>default</instance>
</interface>
</hal>
Secondly, finger service will be started after you define it in the file below.
device/linaro/hikey/device-common.mk
+#init finger service and copy
android.hardware.biometrics.fingerprint#2.1-service.rc to
system/vendor/etc/init
+PRODUCT_PACKAGES += \
+android.hardware.biometrics.fingerprint#2.1-service
+# copy permission file of finger service
+PRODUCT_COPY_FILES += \
+frameworks/native/data/etc/android.hardware.fingerprint.xml:system/etc
/permissions/android.hardware.fingerprint.xml
Finally, check finger service has been started and running in Android system by using terminal commands such as "adb shell" and "ps | grep finger".
Any suggestion is welcome.
I found out that I need to add the code to the manifest.xml
(Ref. https://source.android.com/devices/architecture/vintf/objects )
<hal format="hidl">
<name>android.hardware.biometrics.fingerprint</name>
<transport>hwbinder</transport>
<impl level="generic"></impl>
<version>2.1</version>
<interface>
<name>IBiometricsFingerprint</name>
<instance>default</instance>
</interface>
</hal>
I am developing game using cocos2d-x I am succesfully playing it on iOS, MacOS and win32 but at the moment I am having issue trying to launch it on android. Compilation and installation are completed I just can't launch it because of the problem I can't understand/see. Could someone help or hint me about the problem?
Info: testing on real device, Android version 4.4.4., cocos2d-x-3.13.1, c++, target 4.4.2, eclipse Neon.1a Release (4.6.1), mac os.
If additional information is required I can provide it.
AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.companyName.gameName"
android:versionCode="1"
android:versionName="1.0"
android:installLocation="auto">
<uses-sdk android:minSdkVersion="19"/>
<uses-feature android:glEsVersion="0x00020000" />
<application android:label="#string/app_name"
android:icon="#drawable/icon">
<!-- Tell Cocos2dxActivity the name of our .so -->
<meta-data android:name="android.app.lib_name"
android:value="MyGame" />
<activity android:name="org.cocos2dx.cpp.AppActivity"
android:label="#string/app_name"
android:screenOrientation="landscape"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
android:configChanges="orientation|keyboardHidden|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<supports-screens android:anyDensity="true"
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"/>
<uses-permission android:name="android.permission.INTERNET"/>
<permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" android:protectionLevel="signature"/>
LogCat (warn, error, assert):
04-21 09:49:49.917: E/Watchdog(596): !#Sync 1245
04-21 09:49:52.780: W/AlarmManager(596): Set alarm: type= 3 triggerAtTime= 143810266 , called by : com.google.android.gms, intent:Intent { cmp=com.google.android.gms/.lockbox.LockboxAlarmReceiver }
04-21 09:49:59.997: W/AlarmManager(596): Set alarm: type= 3 triggerAtTime= 143817481 , called by : android, intent:Intent { act=android.intent.action.TIME_TICK flg=0x50000000 }
04-21 09:50:00.157: W/ResourceType(2304): Failure getting entry for 0x010400da (t=3 e=218) in package 0 (error -75)
04-21 09:50:00.157: E/accuweather(2304): [AccuTab_Magagine]>>> UIMK:1463 [0:0] time : 08:50
04-21 09:50:00.177: W/ResourceType(2304): Failure getting entry for 0x010400da (t=3 e=218) in package 0 (error -75)
04-21 09:50:19.917: E/Watchdog(596): !#Sync 1246
04-21 09:50:36.803: W/ContextImpl(25935): Calling a method in the system process without a qualified user: android.app.ContextImpl.startActivity:1255 android.content.ContextWrapper.startActivity:330 android.content.ContextWrapper.startActivity:330 com.samsung.android.MtpApplication.MtpReceiver$3.handleMessage:786 android.os.Handler.dispatchMessage:102
04-21 09:50:36.813: W/ContextImpl(25935): Calling a method in the system process without a qualified user: android.app.ContextImpl.startActivity:1267 android.app.ContextImpl.startActivity:1256 android.content.ContextWrapper.startActivity:330 android.content.ContextWrapper.startActivity:330 com.samsung.android.MtpApplication.MtpReceiver$3.handleMessage:786
04-21 09:50:37.033: W/ActivityManager(596): mDVFSHelper.acquire()
04-21 09:50:37.043: E/MTPRx(25935): started activity for popup
04-21 09:50:37.154: W/ApplicationPackageManager(25935): getCSCPackageItemText()
04-21 09:50:37.204: E/SettingsReceiverActivity(25935): PREF_DONT_ASK_AGAIN : true
04-21 09:50:37.214: W/InputMethodManagerService(596): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#42ef9528 attribute=null, token = android.os.BinderProxy#42a655d8
04-21 09:50:38.084: W/ApplicationPackageManager(596): getCSCPackageItemText()
04-21 09:50:40.036: W/ActivityManager(596): mDVFSHelper.release()
04-21 09:50:49.916: E/Watchdog(596): !#Sync 1247
04-21 09:50:52.789: W/AlarmManager(596): Set alarm: type= 3 triggerAtTime= 144530276 , called by : android, intent:Intent { act=android.net.ConnectivityService.action.PKT_CNT_SAMPLE_INTERVAL_ELAPSED flg=0x4000000 }
04-21 09:50:52.849: W/AlarmManager(596): Set alarm: type= 3 triggerAtTime= 143870336 , called by : com.google.android.gms, intent:Intent { cmp=com.google.android.gms/.lockbox.LockboxAlarmReceiver }
04-21 09:50:59.996: W/AlarmManager(596): Set alarm: type= 3 triggerAtTime= 143877482 , called by : android, intent:Intent { act=android.intent.action.TIME_TICK flg=0x50000000 }
04-21 09:51:00.076: W/ResourceType(2304): Failure getting entry for 0x010400da (t=3 e=218) in package 0 (error -75)
04-21 09:51:00.076: E/accuweather(2304): [AccuTab_Magagine]>>> UIMK:1463 [0:0] time : 08:51
04-21 09:51:00.096: W/ResourceType(2304): Failure getting entry for 0x010400da (t=3 e=218) in package 0 (error -75)
04-21 09:51:03.719: E/memtrack(26128): Couldn't load memtrack module (No such file or directory)
04-21 09:51:03.719: E/android.os.Debug(26128): failed to load memtrack module: -2
04-21 09:51:03.900: W/ActivityManager(596): No content provider found for permission revoke: file:///data/local/tmp/MyGame.apk
04-21 09:51:19.915: E/Watchdog(596): !#Sync 1248
04-21 09:51:30.275: W/ApplicationPackageManager(25304): getCSCPackageItemText()
04-21 09:51:42.527: W/ActivityManager(596): No content provider found for permission revoke: file:///data/local/tmp/MyGame.apk
04-21 09:51:43.588: E/PackageManager(596): parse pkg : /data/app/vmdl276537072.tmp
04-21 09:51:43.618: E/PackageManager(596): dexopt start
04-21 09:51:44.980: E/PackageManager(596): dexopt end
04-21 09:51:49.915: E/Watchdog(596): !#Sync 1249
04-21 09:51:53.068: W/AlarmManager(596): Set alarm: type= 3 triggerAtTime= 143930557 , called by : com.google.android.gms, intent:Intent { cmp=com.google.android.gms/.lockbox.LockboxAlarmReceiver }
04-21 09:51:56.111: W/PackageManager(596): verifying app can be installed or not
04-21 09:51:56.331: W/PackageManager(596): Not granting permission android.permission.INSTALL_LOCATION_PROVIDER to package com.companyName.GameName (protectionLevel=18 flags=0x8be46)
04-21 09:51:56.511: W/ApplicationPackageManager(596): getCSCPackageItemText()
04-21 09:51:56.561: W/ApplicationPackageManager(596): getCSCPackageItemText()
04-21 09:51:56.771: W/ApplicationPackageManager(596): getCSCPackageItemText()
04-21 09:51:56.781: W/ApplicationPackageManager(930): getCSCPackageItemText()
04-21 09:51:56.781: W/ApplicationPackageManager(930): getCSCPackageItemText()
04-21 09:51:56.781: E/SamsungIME(1471): mOCRHelper is null
04-21 09:51:56.941: W/ApplicationPackageManager(951): getCSCPackageItemText()
04-21 09:51:58.343: W/ApplicationPackageManager(1195): getCSCPackageItemText()
04-21 09:51:58.453: E/EdmStorageProvider(596): Admin not in database, something went wrong
04-21 09:51:59.103: W/AlarmManager(596): Set alarm: type= 0 triggerAtTime= 1492761134119 , called by : com.android.vending, intent:Intent { cmp=com.android.vending/com.google.android.finsky.services.ContentSyncService }
04-21 09:51:59.344: W/IcingInternalCorpora(1352): getNumBytesRead when not calculated.
04-21 09:51:59.354: E/memtrack(26153): Couldn't load memtrack module (No such file or directory)
04-21 09:51:59.354: E/android.os.Debug(26153): failed to load memtrack module: -2
04-21 09:51:59.504: E/Finsky(25304): [1] com.google.android.finsky.wear.bl.a(847): onConnectionFailed: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}
04-21 09:51:59.814: W/ActivityManager(596): mDVFSHelper.acquire()
04-21 09:51:59.994: W/AlarmManager(596): Set alarm: type= 3 triggerAtTime= 143937482 , called by : android, intent:Intent { act=android.intent.action.TIME_TICK flg=0x50000000 }
04-21 09:52:00.215: W/ActivityManager(596): Permission Denial: getCurrentUser() from pid=26179, uid=10129 requires android.permission.INTERACT_ACROSS_USERS
04-21 09:52:00.245: W/ApplicationPackageManager(26179): getCSCPackageItemText()
04-21 09:52:00.275: W/ActivityManager(596): Permission Denial: getCurrentUser() from pid=26179, uid=10129 requires android.permission.INTERACT_ACROSS_USERS
04-21 09:52:00.615: E/JniHelper(26179): Failed to find static java method. Class name: (null), method name: getCocos2dxPackageName, signature: ()Ljava/lang/String;
04-21 09:52:00.615: W/ResourceType(2304): Failure getting entry for 0x010400da (t=3 e=218) in package 0 (error -75)
04-21 09:52:00.625: A/libc(26179): Fatal signal 11 (SIGSEGV) at 0xfffffff4 (code=1), thread 26179 (peFromTheIsland)
04-21 09:52:00.635: E/accuweather(2304): [AccuTab_Magagine]>>> UIMK:1463 [0:0] time : 08:52
04-21 09:52:00.645: W/ResourceType(2304): Failure getting entry for 0x010400da (t=3 e=218) in package 0 (error -75)
04-21 09:52:00.865: W/SQLiteConnectionPool(1352): A SQLiteConnection object for database '+data+data+com_google_android_gms+databases+metrics_db' was leaked! Please fix your application to end transactions in progress properly and to close the database when it is no longer needed.
04-21 09:52:00.875: W/SQLiteConnectionPool(1352): A SQLiteConnection object for database '+data+data+com_google_android_gms+databases+help_responses_db_18' was leaked! Please fix your application to end transactions in progress properly and to close the database when it is no longer needed.
04-21 09:52:00.875: W/SQLiteConnectionPool(1352): A SQLiteConnection object for database '+data+data+com_google_android_gms+databases+auto_complete_suggestions_db' was leaked! Please fix your application to end transactions in progress properly and to close the database when it is no longer needed.
04-21 09:52:00.875: W/ApplicationPackageManager(1352): getCSCPackageItemText()
04-21 09:52:01.165: W/ActivityManager(596): Force finishing activity com.companyName.GameName/org.cocos2dx.cpp.AppActivity
04-21 09:52:01.206: W/ApplicationPackageManager(596): getCSCPackageItemText()
04-21 09:52:01.216: W/ApplicationPackageManager(596): getCSCPackageItemText()
04-21 09:52:01.516: E/android.os.Debug(596): !#Dumpstate > dumpstate -k -t -z -d -m 26179 -o /data/log/dumpstate_app_error
04-21 09:52:01.596: W/ContextImpl(596): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1372 com.android.server.analytics.data.collection.application.CrashAnrDetector.broadcastEvent:296 com.android.server.analytics.data.collection.application.CrashAnrDetector.processDropBoxEntry:254 com.android.server.analytics.data.collection.application.CrashAnrDetector.access$100:60 com.android.server.analytics.data.collection.application.CrashAnrDetector$1.onReceive:102
04-21 09:52:01.716: W/ActivityManager(596): Activity pause timeout for ActivityRecord{425a2d00 u0 com.companyName.GameName/org.cocos2dx.cpp.AppActivity t89 f}
04-21 09:52:01.906: W/ActivityManager(596): mDVFSHelper.release()
04-21 09:52:02.577: W/ApplicationPackageManager(596): getCSCPackageItemText()
LogCat (Filtered for application (Full)):
04-21 09:52:00.185: D/ActivityThread(26179): handleBindApplication:com.companyName.gameName
04-21 09:52:00.245: W/ApplicationPackageManager(26179): getCSCPackageItemText()
04-21 09:52:00.265: D/DisplayManager(26179): DisplayManager()
04-21 09:52:00.305: D/dalvikvm(26179): Trying to load lib /data/app-lib/com.companyName.gameName-1/libMyGame.so 0x41ccab70
04-21 09:52:00.615: E/JniHelper(26179): Failed to find static java method. Class name: (null), method name: getCocos2dxPackageName, signature: ()Ljava/lang/String;
04-21 09:52:00.625: A/libc(26179): Fatal signal 11 (SIGSEGV) at 0xfffffff4 (code=1), thread 26179 (peFromTheIsland)
<uses-permission android:name="android.permission.INSTALL_LOCATION_PROVIDER"/>
remove this permission from Manifest file. you can only use normal and Dangerous permission.
A third-party developer cannot grant to his/her application the permission required to install a new location provider (android.permission.INSTALL_LOCATION_PROVIDER). Only OEMs are allowed to install a new location provider.
EDIT
<permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" android:protectionLevel="signature"/>
EDIT
check package name I see com.companyName.gameName in AndroidManifest.xml, you are running your app using package com.companyName.GameName and AppActivity is in org.cocos2dx.cpp
This issue was caused by extern Userdefaults in Constants. To fix it I changed (Constants.cpp):
cocos2d::UserDefault *userDefaults = cocos2d::UserDefault::getInstance();
Constants.hpp:
extern cocos2d::UserDefault *userDefaults;
To:
Constants.cpp
cocos2d::UserDefault *userDefaults;
And (AppDelegate.cpp)
userDefaults = cocos2d::UserDefault::getInstance();
Have not done any changes to Constants.hpp.
Permissions is not required and also were was no problem with package name.
Logcat messages was not helpfull...
I have a several web application that I want to be able to run through a webview in a native android application. I am currently embedding a crosswalk browser and loading the applications in that. It works great for some of the web applications but as the size of the web application increases I get errors that crash my android application.
Things I have tried:
android:largeHeap="true" - helped I was able to run larger web applications.
android:hardwareAccelerated="true" - helped I got better performance.
xwalk-command-line='--ignore-gpu-blacklist' in assets/xwalk-commandline - also helps
There are still some web applications (created through unity) that required me to allocate about 1Gb when I was creating them for desktop testing. I am will be using this android app on the newest phones and would be ok with such a high memory usage.
It works if I try to open this application on a desktop browser so that is what leads me to believe that it is a memory allocation issue. I am using crosswalk 17 which has webGL enabled and the smaller applications run webgl just fine.
I have a few questions:
Is there a way to force the crosswalk embedded browser to allocate 1GB of memory for itself. (I know this is going to crush my device and is probably not great but please indulge me)
Can I expand my application's memory usage beyond largeHeap. If so how? And do I need to do so to enable such large web applications?
Are there any issues that I am missing that are possibly masking the real issues here.
I know this type of application would only ever run on the newest kinds of phones. what are the repercussions for an application that has such a high memory usage?
Are there any other avenues I should explore to enable me to run large web applications within an android app?
Here are the answers to the FAQs of stack overflow users :)
Xml:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.mycompany.myproject.webapplicationActivity">
<org.xwalk.core.XWalkView
android:id="#+id/xwalkWebView"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#000000"
/>
</RelativeLayout>
Activity onCreate:
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.webapplicationActivity);
xWalkWebView=(XWalkView)findViewById(R.id.xwalkWebView);
// turn on debugging
XWalkPreferences.setValue(XWalkPreferences.REMOTE_DEBUGGING, true);
xWalkWebView.setKeepScreenOn(true);
xWalkWebView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN);
String urlToBeLoaded = "http://www.google.com";
Bundle bundle = getIntent().getExtras();
if (savedInstanceState == null) {
Bundle extras = getIntent().getExtras();
if(extras == null) {
Log.i(TAG,"error in reading extras");
} else {
urlToBeLoaded = extras.getString("url");
}
}
xWalkWebView.load(urlToBeLoaded, null);
Permissions
*Crosswalk requires a lot of these and I am using the remainder. But maybe there is a conflict there.
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
ADB logcat
GL : validate_display:255 error 3008 (EGL_BAD_DISPLAY)
02-17 18:11:55.862 23023 23023 W art : Attempt to remove non-JNI local reference, dumping thread
02-17 18:11:55.903 4335 4448 I ActivityManager: Displayed com.mycompany.myProject/.GamePlayActivity: +464ms
02-17 18:11:55.904 23023 23023 W cr.BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 23023
02-17 18:11:55.904 22463 22463 I Keyboard.Facilitator: onFinishInput()
02-17 18:11:55.931 23023 23023 E chromium: [ERROR:layer_tree_host_impl.cc(2121)] Forcing zero-copy tile initialization as worker context is missing
02-17 18:11:55.980 4335 4448 I WindowManager: Screen frozen for +541ms due to Window{f87dd7b u0 com.mycompany.myProject/com.mycompany.myProject.GamePlayActivity}
02-17 18:11:57.987 4335 4448 I art : Starting a blocking GC Explicit
02-17 18:11:58.205 4335 4448 I art : Explicit concurrent mark sweep GC freed 12393(780KB) AllocSpace objects, 5(100KB) LOS objects, 23% free, 52MB/68MB, paused 1.298ms total 216.765ms
02-17 18:11:58.206 4335 15896 W InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#3b6394f attribute=null, token = android.os.BinderProxy#d44f10a
02-17 18:11:58.726 23023 23023 I chromium: [INFO:CONSOLE(1)] "Decompressed Release/StuntRunner_WebGL.memgz in 254ms. You can remove this delay if you configure your web server to host files using gzip compression.", source: https://<source>/Release/UnityLoader.js (1)
02-17 18:11:59.103 22037 22037 I ServiceManager: Waiting for service AtCmdFwd...
02-17 18:11:59.663 23023 23023 I chromium: [INFO:CONSOLE(1)] "Decompressed Release/StuntRunner_WebGL.jsgz in 853ms. You can remove this delay if you configure your web server to host files using gzip compression.", source: https://<source>/Release/UnityLoader.js (1)
02-17 18:11:59.985 23023 23023 I chromium: [INFO:CONSOLE(1)] "optimizing out Math.fround calls", source: https://<source>/Release/UnityLoader.js (1)
02-17 18:12:00.103 22037 22037 I ServiceManager: Waiting for service AtCmdFwd...
02-17 18:12:01.104 22037 22037 I ServiceManager: Waiting for service AtCmdFwd...
02-17 18:12:02.105 22037 22037 I ServiceManager: Waiting for service AtCmdFwd...
02-17 18:12:03.105 22037 22037 I ServiceManager: Waiting for service AtCmdFwd...
02-17 18:12:03.174 4335 22386 D NetlinkSocketObserver: NeighborEvent{elapsedMs=775340136, 192.168.1.1, [100D7F6DFA6E], RTM_NEWNEIGH, NUD_REACHABLE}
02-17 18:12:04.106 22037 22037 W Atfwd_Sendcmd: AtCmdFwd service not published, waiting... retryCnt : 5
02-17 18:12:10.387 4335 6452 D ConnectivityService: ConnectivityService NetworkRequestInfo binderDied(NetworkRequest [ id=842, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ], android.os.BinderProxy#82c1e86)
02-17 18:12:10.392 4335 6549 I ActivityManager: Process com.instagram.android (pid 14465) has died
02-17 18:12:10.409 4335 5621 D ConnectivityService: releasing NetworkRequest NetworkRequest [ id=842, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ]
02-17 18:12:10.504 4335 5621 E ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ id=842, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ]
02-17 18:12:10.781 23023 23263 F libc : Fatal signal 4 (SIGILL), code 1, fault addr 0xd3781358 in tid 23263 (Chrome_InProcRe)
02-17 18:12:10.886 3293 3293 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-17 18:12:10.887 3293 3293 F DEBUG : Build fingerprint: 'google/angler/angler:6.0.1/MMB29P/2473553:user/release-keys'
02-17 18:12:10.887 3293 3293 F DEBUG : Revision: '0'
02-17 18:12:10.887 3293 3293 F DEBUG : ABI: 'arm'
02-17 18:12:10.887 3293 3293 F DEBUG : pid: 23023, tid: 23263, name: Chrome_InProcRe >>> com.mycompany.myProject <<<
02-17 18:12:10.887 3293 3293 F DEBUG : signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 0xd3781358
02-17 18:12:10.933 3293 3293 F DEBUG : r0 d5366044 r1 40005000 r2 0855d000 r3 02182000
02-17 18:12:10.933 3293 3293 F DEBUG : r4 d5366044 r5 40000000 r6 00000000 r7 00000000
02-17 18:12:10.933 3293 3293 F DEBUG : r8 40005000 r9 d66d4050 sl 40000000 fp d66bee10
02-17 18:12:10.934 3293 3293 F DEBUG : ip f70ff624 sp d66bed40 lr d3dfa5e1 pc d3781358 cpsr 80030030
02-17 18:12:10.938 3293 3293 F DEBUG :
02-17 18:12:10.938 3293 3293 F DEBUG : backtrace:
02-17 18:12:10.926 3293 3293 W debuggerd: type=1400 audit(0.0:9681): avc: denied { read } for name="kgsl-3d0" dev="tmpfs" ino=1150 scontext=u:r:debuggerd:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file permissive=0
02-17 18:12:10.938 3293 3293 F DEBUG : #00 pc 001e3358 /data/app/com.mycompany.myProject-1/lib/arm/libxwalkcore.so
02-17 18:12:10.938 3293 3293 F DEBUG : #01 pc 0085c5dd /data/app/com.mycompany.myProject-1/lib/arm/libxwalkcore.so
02-17 18:12:11.276 3293 3293 W debuggerd: type=1400 audit(0.0:9682): avc: denied { read } for name="kgsl-3d0" dev="tmpfs" ino=1150 scontext=u:r:debuggerd:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file permissive=0
02-17 18:12:11.817 4335 23497 W ActivityManager: Force finishing activity com.mycompany.myProject/.GamePlayActivity
02-17 18:12:11.818 3293 3293 F DEBUG :
02-17 18:12:11.818 3293 3293 F DEBUG : Tombstone written to: /data/tombstones/tombstone_05
02-17 18:12:11.818 3293 3293 E DEBUG : AM write failed: Broken pipe
02-17 18:12:11.890 4335 22149 I OpenGLRenderer: Initialized EGL, version 1.4
02-17 18:12:11.987 4335 5717 D GraphicsStats: Buffer count: 4
02-17 18:12:11.989 4335 5980 I WindowState: WIN DEATH: Window{def3a97 u0 com.mycompany.myProject/com.mycompany.myProject.LibraryActivity}
02-17 18:12:11.994 4335 5709 I WindowState: WIN DEATH: Window{9ffe3af u0 com.mycompany.myProject/com.mycompany.myProject.LoginActivity}
02-17 18:12:11.996 4335 4351 I WindowState: WIN DEATH: Window{ee84425 u0 com.mycompany.myProject/com.mycompany.myProject.GameDescriptionActivity}
02-17 18:12:11.999 4335 7252 I WindowState: WIN DEATH: Window{a09b55b u0 SurfaceView}
02-17 18:12:12.001 4335 5717 I WindowState: WIN DEATH: Window{f87dd7b u0 com.mycompany.myProject/com.mycompany.myProject.GamePlayActivity}
02-17 18:12:12.022 3309 3309 I Zygote : Process 23023 exited due to signal (4)
02-17 18:12:12.024 4335 28075 I ActivityManager: Process com.mycompany.myProject (pid 23023) has died
02-17 18:12:12.073 4335 28075 I ActivityManager: Start proc 23507:com.mycompany.myProject/u0a179 for activity com.mycompany.myProject/.GameDescriptionActivity
02-17 18:12:12.076 23507 23507 I art : Late-enabling -Xcheck:jni
Thank you in advance!
I had a problem like that. I thought this problem came with ads like adsense or some went wrong with JavaScript
Try
xwalk Release 'org.xwalk:xwalk_core_library:21.51.546.7'
I hope that helps you
I have a problem using ActionBarSherlock in one of my projects. My App installs fine when pushing it to my Nexus 4, but when I try to install it to my HTC Desire (CM7 with Android 2.3.7 - API Level 10) I get the following error.
[2013-02-03 18:47:44 - MyApp] Project dependency found, installing: Actionbar
[2013-02-03 18:47:44 - Actionbar] Uploading Actionbar.apk onto device 'HT042PL03910'
[2013-02-03 18:47:44 - Actionbar] Installing Actionbar.apk...
[2013-02-03 18:47:47 - Actionbar] Installation error: INSTALL_FAILED_OLDER_SDK
[2013-02-03 18:47:47 - Actionbar] Please check logcat output for more details.
[2013-02-03 18:47:47 - MyApp] Launch canceled!
I am using Sherlock 4.2.0 as a libraryproject and added the R11 of android-support-v4. Sherlock itself is configured like this:
Manifest:
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16"/>
Project-Properties:
android.library=true
# Project target.
target=android-14
My application uses the following settings:
Manifest:
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16" />
Project-Properties:
target=Google Inc.:Google APIs:16
android.library.reference.1=../ActionbarSherlock
I went through the whole logcat output but couldn't find anything helpful. Has anybody else experienced this and can help me?
========= EDIT ===============
Manifest of my App (mindSdk changed to 8):
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.hsrm.medieninf.mobcomp.klingelapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.INTERNET" />
<permission
android:name="de.hsrm.medieninf.mobcomp.klingelapp.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="de.hsrm.medieninf.mobcomp.klingelapp.permission.C2D_MESSAGE" />
<!-- App receives GCM messages. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!-- GCM connects to Google Services. -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- GCM requires a Google account. -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<!-- Keeps the processor from sleeping when a message is received. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/Theme.Sherlock.Light" >
<uses-library android:name="com.google.android.maps" />
(...Activities and Services here ...)
</application>
</manifest>
Full Logcat from new Emulator AVD with Google APIs Level 10:
02-03 21:09:59.647: I/PackageManager(77): Removing non-system package:de.hsrm.medieninf.mobcomp.klingelapp
02-03 21:09:59.647: I/ActivityManager(77): Force stopping package de.hsrm.medieninf.mobcomp.klingelapp uid=10038
02-03 21:09:59.877: D/dalvikvm(77): GC_CONCURRENT freed 1369K, 49% free 5484K/10631K, external 3226K/4029K, paused 4ms+12ms
02-03 21:09:59.977: D/PackageManager(77): Scanning package de.hsrm.medieninf.mobcomp.klingelapp
02-03 21:09:59.977: I/PackageManager(77): Package de.hsrm.medieninf.mobcomp.klingelapp codePath changed from /data/app/de.hsrm.medieninf.mobcomp.klingelapp-1.apk to /data/app/de.hsrm.medieninf.mobcomp.klingelapp-2.apk; Retaining data and using new
02-03 21:09:59.977: I/PackageManager(77): Unpacking native libraries for /data/app/de.hsrm.medieninf.mobcomp.klingelapp-2.apk
02-03 21:10:00.047: D/installd(35): DexInv: --- BEGIN '/data/app/de.hsrm.medieninf.mobcomp.klingelapp-2.apk' ---
02-03 21:10:04.096: D/dalvikvm(598): DexOpt: load 250ms, verify+opt 957ms
02-03 21:10:04.306: D/installd(35): DexInv: --- END '/data/app/de.hsrm.medieninf.mobcomp.klingelapp-2.apk' (success) ---
02-03 21:10:04.306: W/PackageManager(77): Code path for pkg : de.hsrm.medieninf.mobcomp.klingelapp changing from /data/app/de.hsrm.medieninf.mobcomp.klingelapp-1.apk to /data/app/de.hsrm.medieninf.mobcomp.klingelapp-2.apk
02-03 21:10:04.306: W/PackageManager(77): Resource path for pkg : de.hsrm.medieninf.mobcomp.klingelapp changing from /data/app/de.hsrm.medieninf.mobcomp.klingelapp-1.apk to /data/app/de.hsrm.medieninf.mobcomp.klingelapp-2.apk
02-03 21:10:04.306: D/PackageManager(77): Services: de.hsrm.medieninf.mobcomp.klingelapp.GCMIntentService de.hsrm.medieninf.mobcomp.klingelapp.services.LocationService de.hsrm.medieninf.mobcomp.klingelapp.services.SyncService de.hsrm.medieninf.mobcomp.klingelapp.services.AppService de.hsrm.medieninf.mobcomp.klingelapp.services.AuthService
02-03 21:10:04.306: D/PackageManager(77): Receivers: com.google.android.gcm.GCMBroadcastReceiver
02-03 21:10:04.306: D/PackageManager(77): Activities: de.hsrm.medieninf.mobcomp.klingelapp.ui.LoginActivity de.hsrm.medieninf.mobcomp.klingelapp.ui.MessageEditor de.hsrm.medieninf.mobcomp.klingelapp.ui.StartActivity de.hsrm.medieninf.mobcomp.klingelapp.ui.ContactsActivity de.hsrm.medieninf.mobcomp.klingelapp.ui.KlingelSettings de.hsrm.medieninf.mobcomp.klingelapp.ui.NewStartActivity de.hsrm.medieninf.mobcomp.klingelapp.ui.MessagesActivity de.hsrm.medieninf.mobcomp.klingelapp.ui.MessageDetails de.hsrm.medieninf.mobcomp.klingelapp.ui.RegisterActivity de.hsrm.medieninf.mobcomp.klingelapp.ui.FriendRequestActivity
02-03 21:10:04.306: D/PackageManager(77): Permissions: de.hsrm.medieninf.mobcomp.klingelapp.permission.C2D_MESSAGE
02-03 21:10:04.326: I/ActivityManager(77): Force stopping package de.hsrm.medieninf.mobcomp.klingelapp uid=10038
02-03 21:10:04.436: I/installd(35): move /data/dalvik-cache/data#app#de.hsrm.medieninf.mobcomp.klingelapp-2.apk#classes.dex -> /data/dalvik-cache/data#app#de.hsrm.medieninf.mobcomp.klingelapp-2.apk#classes.dex
02-03 21:10:04.436: D/PackageManager(77): New package installed in /data/app/de.hsrm.medieninf.mobcomp.klingelapp-2.apk
02-03 21:10:04.446: W/PackageManager(77): Unknown permission android.permission.ADD_SYSTEM_SERVICE in package com.android.phone
02-03 21:10:04.446: W/PackageManager(77): Not granting permission android.permission.SEND_DOWNLOAD_COMPLETED_INTENTS to package com.android.browser (protectionLevel=2 flags=0x9be45)
02-03 21:10:04.457: W/PackageManager(77): Unknown permission com.google.android.gm.permission.WRITE_GMAIL in package com.android.settings
02-03 21:10:04.457: W/PackageManager(77): Unknown permission com.google.android.gm.permission.READ_GMAIL in package com.android.settings
02-03 21:10:04.466: W/PackageManager(77): Unknown permission android.permission.READ_OWNER_DATA in package com.android.email
02-03 21:10:04.476: W/PackageManager(77): Unknown permission com.android.providers.im.permission.READ_ONLY in package com.google.android.apps.maps
02-03 21:10:04.476: W/PackageManager(77): Not granting permission android.permission.DEVICE_POWER to package com.android.deskclock (protectionLevel=2 flags=0x8be45)
02-03 21:10:04.606: I/ActivityManager(77): Force stopping package de.hsrm.medieninf.mobcomp.klingelapp uid=10038
02-03 21:10:04.706: D/dalvikvm(260): GC_EXPLICIT freed 1K, 49% free 3020K/5831K, external 4756K/5631K, paused 67ms
02-03 21:10:04.746: D/dalvikvm(226): GC_EXPLICIT freed 94K, 51% free 2964K/5959K, external 1625K/2137K, paused 75ms
02-03 21:10:04.806: W/RecognitionManagerService(77): no available voice recognition services found
02-03 21:10:04.856: D/GTalkService(287): handlePackageInstalled: re-initialize providers
02-03 21:10:04.856: D/GTalkService(287): [RawStanzaProvidersMgr] ##### searchProvidersFromIntent
02-03 21:10:04.856: D/GTalkService(287): [RawStanzaProvidersMgr] no intent receivers found
02-03 21:10:05.136: I/Launcher(260): setLoadOnResume
02-03 21:10:05.226: D/dalvikvm(77): GC_EXPLICIT freed 1202K, 54% free 4962K/10631K, external 3226K/4029K, paused 75ms
02-03 21:10:05.256: I/installd(35): unlink /data/dalvik-cache/data#app#de.hsrm.medieninf.mobcomp.klingelapp-1.apk#classes.dex
02-03 21:10:05.296: D/AndroidRuntime(589): Shutting down VM
02-03 21:10:05.306: D/dalvikvm(589): GC_CONCURRENT freed 101K, 72% free 295K/1024K, external 0K/0K, paused 0ms+1ms
02-03 21:10:05.306: D/jdwp(589): Got wake-up signal, bailing out of select
02-03 21:10:05.306: D/dalvikvm(589): Debugger has detached; object registry had 1 entries
02-03 21:10:05.326: I/dalvikvm(589): JNI: AttachCurrentThread (from ???.???)
02-03 21:10:05.326: I/AndroidRuntime(589): NOTE: attach of thread 'Binder Thread #3' failed
02-03 21:10:06.686: D/AndroidRuntime(604): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
02-03 21:10:06.686: D/AndroidRuntime(604): CheckJNI is ON
02-03 21:10:07.106: D/AndroidRuntime(604): Calling main entry com.android.commands.pm.Pm
02-03 21:10:07.196: D/dalvikvm(442): GC_EXPLICIT freed 10K, 51% free 2727K/5511K, external 1625K/2137K, paused 43ms
02-03 21:10:07.206: W/ActivityManager(77): No content provider found for:
02-03 21:10:07.306: W/ActivityManager(77): No content provider found for:
02-03 21:10:07.316: D/PackageParser(77): Scanning package: /data/app/vmdl-63285559.tmp
02-03 21:10:07.326: W/PackageParser(77): /data/app/vmdl-63285559.tmp (at Binary XML file line #8): Requires newer sdk version #16 (current version is #10)
So instead of searching for where I went wrong, I checked out a working revision without sherlock. I then added sherlock as a library and made the same changes to my activites I did yesterday. But now, install works fine.