Can't deploy Unity Android project to Kindle Fire any longer - android

I have a Unity project that is already successfully distributed via Google Play and Amazon Store. It runs on all the Kindle Fire devices as well. Now I have a new version, but for the life of me I can't get it to run on my Kindle Fire test device. Once I build & run, it just stops on a black screen, and the log leaves me scratching my head what might go wrong here. This is all the log being created throughout the start sequence:
I/ActivityStack( 258): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 pkg=de.applicationsystems.CafeIntlSolo cmp=de.applicationsystems.CafeIntlSolo/.CIAndroidPlugin} from pid 794
V/ActivityStack( 258): Prepare open transition: starting ActivityRecord{4180f990 de.applicationsystems.CafeIntlSolo/.CIAndroidPlugin}
V/Sensors ( 258): accel data: -0.177231 -0.162861 9.376501
D/dalvikvm( 258): GC_FOR_ALLOC freed 551K, 30% free 15332K/21703K, paused 46ms
V/ActivityStack( 258): Prepare open transition: prev=ActivityRecord{41bae778 com.amazon.kindle.otter/.Launcher}
I/ActivityManager( 258): Start proc de.applicationsystems.CafeIntlSolo for activity de.applicationsystems.CafeIntlSolo/.CIAndroidPlugin: pid=7240 uid=10022 gids={3003, 1015}
D/dalvikvm( 109): GC_EXPLICIT freed 37K, 3% free 10994K/11331K, paused 1ms+3ms
I/PhoneWindowManager( 258): repositioning status bar
D/dalvikvm( 258): GC_CONCURRENT freed 52K, 25% free 16369K/21703K, paused 2ms+7ms
D/AmazonToggle( 449): setText toggle_on
D/AmazonToggle( 449): setText toggle_off
D/QuickSettings-Wifi( 449): handleSelection Begin
D/dalvikvm( 109): GC_EXPLICIT freed <1K, 3% free 10994K/11331K, paused 9ms+2ms
D/dalvikvm( 109): GC_EXPLICIT freed <1K, 3% free 10994K/11331K, paused 1ms+2ms
D/dalvikvm( 7240): GC_FOR_ALLOC freed 176K, 3% free 11201K/11527K, paused 18ms
I/dalvikvm-heap( 7240): Grow heap (frag case) to 12.027MB for 1048592-byte allocation
D/dalvikvm( 7240): GC_CONCURRENT freed 1K, 4% free 12224K/12615K, paused 3ms+1ms
D/dalvikvm( 7240): Trying to load lib /data/data/de.applicationsystems.CafeIntlSolo/lib/libmain.so 0x415f6eb0
D/dalvikvm( 7240): Added shared lib /data/data/de.applicationsystems.CafeIntlSolo/lib/libmain.so 0x415f6eb0
V/Sensors ( 258): accel data: -0.162861 -0.110171 10.054292
V/Sensors ( 258): accel data: -0.148491 -0.110171 10.008786
W/ActivityStack( 258): Launch timeout has expired, giving up wake lock!
W/ActivityStack( 258): Activity idle timeout for ActivityRecord{4180f990 de.applicationsystems.CafeIntlSolo/.CIAndroidPlugin}
V/Sensors ( 258): accel data: -0.220342 -0.119751 9.956097
V/Sensors ( 258): accel data: -0.179626 -0.086221 10.018367
V/Sensors ( 258): accel data: -0.205972 -0.114961 9.996812
D/dalvikvm( 258): GC_CONCURRENT freed 2260K, 30% free 15352K/21703K, paused 2ms+4ms
V/Sensors ( 258): accel data: -0.131726 -0.148491 10.025552
V/Sensors ( 258): accel data: -0.232317 -0.100591 10.039922
The same project just deployed to a Nexus 7 just runs fine, even with the Amazon SDK/GameCircle setup. I already updated all the Android SDKs and the Amazon Unity Plugin, but no change. I've reset the Kindle to factory defaults and tried to install on a fresh machine, but no change. It just won't run. Any ideas how to track that down appreciated!

Answering myself:
You need at least Unity patch 4.6.1p1 from http://unity3d.com/unity/qa/patch-releases. It has the following fix:
(654591) - Android: Fixed freeze during startup on most Amazon Kindle devices.
Note that these patches are not advertised automatically. The latest announced and automatic update was. 4.6.1f1, so it requires you to take explicit action.
Regards, habitoti

Confirmed. 4.6.1p1 fixes the problem. (I think habitoti made a typo with the version)
My previous .apk only worked on the Kindle Fire HDX and not the Kindle Fire HD or original Kindle Fire.

Related

Heap allocation behaves weird - Android

I cannot understand what is happening here - I have been creating a small project just to learn about rotation of an image. But this is not relevant here.
So - I have been doing this before and know how heap works, but right know I cannot get it.
In this small Eclipse project I put an image in the drawable-mdpi folder. The image is
1300 * 1950
So simply - this image will occupy about the following amount of ram (heap)
10 MB (1300 * 1950 * 4)
Red, gree, blue and Alpha. Thats it!
But what is happening. Well see the logcat below!!! the heap of 63 MB for my Samsung Galaxy S3 is almost exhausted.
02-17 08:50:05.144: I/dalvikvm-heap(21097): Grow heap (frag case) to 22.494MB for 10140016-byte allocation
02-17 08:50:05.164: D/dalvikvm(21097): GC_CONCURRENT freed 1K, 5% free 22152K/23175K, paused 12ms+2ms, total 22ms
02-17 08:50:05.329: D/dalvikvm(21097): GC_FOR_ALLOC freed 0K, 5% free 22152K/23175K, paused 11ms, total 11ms
02-17 08:50:05.429: I/dalvikvm-heap(21097): Grow heap (frag case) to 61.174MB for 40560016-byte allocation
02-17 08:50:05.449: D/dalvikvm(21097): GC_CONCURRENT freed 0K, 2% free 61761K/62791K, paused 11ms+3ms, total 22ms
02-17 08:50:06.109: D/libEGL(21097): loaded /system/lib/egl/libEGL_mali.so
02-17 08:50:06.119: D/libEGL(21097): loaded /system/lib/egl/libGLESv1_CM_mali.so
02-17 08:50:06.124: D/libEGL(21097): loaded /system/lib/egl/libGLESv2_mali.so
02-17 08:50:06.179: D/(21097): Device driver API match
02-17 08:50:06.179: D/(21097): Device driver API version: 10
02-17 08:50:06.179: D/(21097): User space API version: 10
02-17 08:50:06.179: D/(21097): mali: REVISION=Linux-r2p4-02rel0 BUILD_DATE=Fri Sep 28 10:42:56 KST 2012
02-17 08:50:06.254: D/OpenGLRenderer(21097): Enabling debug mode 0
First it allocates properly - you can see 10 MB (according to my calculations) and a heap well above that - that is 20 MB. So far so good. BUT THEN IT CONTINUES TO ALLOCATE MEMORY FAR ABOVE THAT LEVEL. Like there was another image of 40 MB (4 times the previous) so the allocated heap ends up in 61 MB, almost tangenting out of memory.
What did I miss here or is it a bug? I have checked all the drawable folders and I know I run this app and not another. I recreated the project to be sure, even changed the image name. restarted the computer AND the device
this is the source code
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ImageView imgview = (ImageView) findViewById(R.id.image);
Bitmap bm = BitmapFactory.decodeResource(getResources(), R.drawable.image1);
}
the xml-file
<ImageView
android:id="#+id/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
more info: The device is rooted

Deployment failed, Internal error

I am working on Xamarin Android Application.When I run my application I am getting this error :
error: Unexpected install output: pkg: /data/local/tmp/com.iKart.androidapplication-Signed.apk
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
My Package Name is : com.iKart.androidapplication
I have already uninstall my application from device using adb uninstall,still I am getting this error.
What is the solution ? Please Help!
This is my Menifest :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.iKart.androidapplication">
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="21" />
<application android:theme="#style/Theme.AppCompat.Light" android:label="Mono.Droid">
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/facebook_app_id" />
<activity android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:theme="#android:style/Theme.Translucent.NoTitleBar" android:label="#string/app_name" />
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</manifest>
In Android Device Logging(Visual Studio) I am getting :
09-16 11:16:20.736 D/AndroidRuntime(23211):
09-16 11:16:20.736 D/AndroidRuntime(23211): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
09-16 11:16:20.736 D/AndroidRuntime(23211): CheckJNI is OFF
09-16 11:16:20.746 D/dalvikvm(23211): Trying to load lib libjavacore.so 0x0
09-16 11:16:20.746 D/dalvikvm(23211): Added shared lib libjavacore.so 0x0
09-16 11:16:20.756 D/dalvikvm(23211): Trying to load lib libnativehelper.so 0x0
09-16 11:16:20.756 D/dalvikvm(23211): Added shared lib libnativehelper.so 0x0
09-16 11:16:20.957 D/AndroidRuntime(23211): Calling main entry com.android.commands.pm.Pm
09-16 11:16:20.967 D/PackageItemInfo(23211): PackageItemInfo static run
09-16 11:16:20.967 D/AndroidRuntime(23211): Shutting down VM
09-16 11:16:21.157 D/dalvikvm(23211): GC_FOR_ALLOC freed 3206K, 51% free 3107K/6332K, paused 5ms, total 7ms
09-16 11:16:21.167 I/dalvikvm-heap(23211): Grow heap (frag case) to 7.284MB for 2359312-byte allocation
09-16 11:16:21.177 D/dalvikvm(23211): GC_CONCURRENT freed 9K, 38% free 5402K/8640K, paused 2ms+4ms, total 10ms
09-16 11:16:21.247 D/dalvikvm(23211): GC_FOR_ALLOC freed 466K, 35% free 5674K/8640K, paused 5ms, total 5ms
09-16 11:16:21.247 I/dalvikvm-heap(23211): Grow heap (frag case) to 7.779MB for 250016-byte allocation
09-16 11:16:21.257 D/dalvikvm(23211): GC_FOR_ALLOC freed 34K, 34% free 5917K/8888K, paused 5ms, total 5ms
09-16 11:16:21.257 I/dalvikvm-heap(23211): Grow heap (frag case) to 7.823MB for 46672-byte allocation
09-16 11:16:21.297 D/PackageItemInfo(23211): MessageLoop costTime=336
09-16 11:16:21.307 D/dalvikvm(23211): GC_CONCURRENT freed 1102K, 27% free 6590K/8936K, paused 1ms+1ms, total 6ms
09-16 11:16:21.307 D/dalvikvm(23211): Compiler shutdown in progress - discarding request
09-16 11:16:21.307 D/dalvikvm(23211): Compiler shutdown in progress - discarding request
09-16 11:16:21.307 D/dalvikvm(23211): Compiler shutdown in progress - discarding request
09-16 11:16:21.307 D/dalvikvm(23211): Compiler shutdown in progress - discarding request
09-16 11:16:21.307 D/dalvikvm(23211): Compiler shutdown in progress - discarding request
I have solved this Myself :
uninstall app from device and then run again.If it still not work then open Android SDK Command Prompt
(open Xamrin-studio > Tools > open a Android SDK Command Prompt)
then write following :
D:\Android\android-sdk> adb uninstall (Applicationpackagename)
you can get application package name from Androidmenifest file which is in properties folder.
This will definitely solve the error.
Thank you
You should rename you package name
from
com.iKart.androidapplication
to
com.ikart.androidapplication
notice capital K is changd to small k
Go to settings and app and make sure any app with same package name is not installed try to reinstall again using adb install -r ikart.apk
There are possible solution based on different scenario
Case 1: Uninstalling an app does sometimes leave the data folder behind we need to manually uninstall the app folder from "Application Manager"
Case 2: In case app uninstalled and don't see the app folder [with the app package name] then we need to use adb commands to uninstall these folders. Use [adb shell pm list packages] command which will show a list of all packages available in the device. If you see your app package in the list then run another adb command to remove [adb shell pm uninstall package name]
Case 3: If none of these works then we need to check the options provided by the Xamarin studio. Enable Shared mono runtime under project options.
Hopefully one of these should resolve your issue.
I think you have a problem with facebook activity. this is how you correctly write it:
<activity android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:theme="#android:style/Theme.Translucent.NoTitleBar"
android:label="#string/app_name" />
<meta-data android:name="com.facebook.sdk.ApplicationId"
android:value="#string/app_id" />
<provider android:authorities="com.facebook.app.FacebookContentProvider[your app_id (without brackets)]"
android:name="com.facebook.FacebookContentProvider"
android:exported="true" />
In the AndroidManifest.xml settings change the "Install Location" from Default to auto
In my case uninstalling all the previous apps that I had installed using Xamarin on the device solved the problem.

Filter log by text?

I am using adb shell logcat -v time filename command programmatically to store logs into a file on an android device.
There are some internal logs for memory releasing activities which are stored under " dalvikvm " tag. (See the logs below). I don't have any problem with these logs but due to these logs, the log file gets heavier.
So my concern is reduce logs which have GC_CONCURRENT freed or WAIT_FOR_CONCURRENT_GC text in it.
I also tried to reduce logs by using it's tag, but it removes all logs related to that tag. I don't want to loose required tags under same tag name. I just don't want the logs which have GC_CONCURRENT freed or WAIT_FOR_CONCURRENT_GC text in it.
Is there any way or any adb command to resolve this problem. Thanks in advance.
04-18 01:02:53.644: D/dalvikvm(4302): GC_CONCURRENT freed 511K, 21% free 4106K/5192K, paused 5ms+1ms, total 19ms
04-18 01:02:53.644: D/dalvikvm(4302): WAIT_FOR_CONCURRENT_GC blocked 6ms
04-18 01:02:53.684: D/dalvikvm(4302): GC_CONCURRENT freed 512K, 21% free 4106K/5192K, paused 1ms+1ms, total 15ms
04-18 01:02:53.684: D/dalvikvm(4302): WAIT_FOR_CONCURRENT_GC blocked 6ms
04-18 01:02:53.724: D/dalvikvm(4302): GC_CONCURRENT freed 512K, 21% free 4106K/5192K, paused 2ms+1ms, total 16ms
04-18 01:02:53.724: D/dalvikvm(4302): WAIT_FOR_CONCURRENT_GC blocked 6ms
04-18 01:02:53.764: D/dalvikvm(4302): GC_CONCURRENT freed 512K, 21% free 4106K/5192K, paused 1ms+1ms, total 16ms
04-18 01:02:53.764: D/dalvikvm(4302): WAIT_FOR_CONCURRENT_GC blocked 7ms
EDIT
I am using
adb shell logcat -v time | grep -v \"GC_CONCURRENT\\|WAIT_FOR_CONCURRENT_GC\" > " + filename command.
It was working when I gave filename as my computer's local path.
But when I tried same with android device /data/data/packagename/filename.txt, it was not working.
It says that bash: /data/data/packagename/filename.txt : No such file or directory Can anybody suggest solution for that.
Don't forget that you can use host side utilities with the output from logcat. I would recommend using grep. In particular, with it's -v/--invert-match option.
adb logcat | grep -v "GC_CONCURRENT\|WAIT_FOR_CONCURRENT_GC" > filename
The command to print specific logs using tag names. *:S which dont read logs related to GC_CONCURRENT freed and WAIT_FOR_CONCURRENT_GC
Syntax
adb logcat TAG_NAME:PRIORITY
Below line displays only logs with ActivityManager, MY_CUSTOM_TAG.. tags
adb logcat ActivityManager:I MY_CUSTOM_TAG:D ANOTHER_CUST_TAG:D *:S
S — Silent (highest priority, on which nothing is ever printed)
For more information visit Official Docs
Android Debug Bridge
Reading and Writing Logs
UPDATED Missed dumping to file.
Dump to file
`adb logcat -d ActivityManager:I MY_CUSTOM_TAG:D ANOTHER_CUST_TAG:D *:S > filename.txt`

Trying to understand whether the app is taking too much memory in android

I have been looking to Logcat output for memory performance. With the given data below, how should I understand whether my app is increasing or releasing it? Is it an acceptable performance?
07-23 14:52:05.910: D/dalvikvm(4909): GC_CONCURRENT freed 1332K, 25% free 7791K/10300K, paused 3ms+3ms, total 45ms
07-23 14:52:06.170: D/dalvikvm(4909): GC_CONCURRENT freed 1230K, 25% free 7811K/10300K, paused 4ms+4ms, total 44ms
07-23 14:52:06.360: D/dalvikvm(4909): GC_CONCURRENT freed 1222K, 24% free 7887K/10300K, paused 3ms+4ms, total 53ms
07-23 14:53:08.610: D/dalvikvm(4909): GC_CONCURRENT freed 1315K, 22% free 8061K/10300K, paused 5ms+3ms, total 99ms
There is a monitor app that comes with the Android SDK. You can use to to look at the memory that your app is using. Take a look at this post on the Android Developers blog.
There is nothing intrinsically wrong with the log output.

Debugging on phone

I have an app that I have been using for a long while now. It's open source and fell out of development. I started modifying it when it broke and it worked fine on my Epic Touch. I recently picked up the Sprint Note 2 and installed it. It forced closed on me. I decided "OK lets see whats going on and why its FCing". I ran it in an emulator 4.1.2 and it worked fine. When I tried to debug it in eclipse using the real phone my logcat showed problems and never loaded:
D/dalvikvm( 1032): Added shared lib libnativehelper.so 0x0
D/dalvikvm( 1032): Note: class Landroid/app/ActivityManagerNative; has 153 ulemented (abstract) methods
D/AndroidRuntime( 1032): Calling main entry com.android.commands.pm.Pm
W/zipro (30332): Unable to open zip '/data/local/tmp/BalanceWidget.apk': Permission denied
D/asset (30332): failed to open Zip archive '/data/local/tmp/BalanceWidget'
I/ApplicationPolicy( 2487): isApplicationInstallationEnabled
W/zipro (30332): Unable to open zip '/data/local/tmp/BalanceWidget.apk': Permission denied
D/asset (30332): failed to open Zip archive '/data/local/tmp/BalanceWidget'
D/dalvikvm( 2487): WAIT_FOR_CONCURRENT_GC blocked 0ms
W/DefContainer(30332): Failed to parse package
W/PackageManager( 2487): verifying app can be installed or not
W/DefContainer(30332): Failed to parse package
D/dalvikvm( 2487): GC_EXPLICIT freed 329K, 14% free 44856K/51591K, paused 4ms, total 96ms
D/AndroidRuntime( 1032): Shutting down VM
D/dalvikvm( 1032): GC_CONCURRENT freed 128K, 87% free 568K/4096K, paused 0ms, total 2ms
D/jdwp ( 1032): Got wake-up signal, bailing out of select
I tried wiping the cache, chmoding the folders, but nothing worked. I changed to a different project to see if it was that project but it did the same thing.
Does anyone have any ideas on what the problem could be and how to fix it?
My phone:
Rooted Stock Sprint Note 2
L900VPALJC
OS Running - Android 4.1.1
Thanks

Categories

Resources