I need to display images in my project from local sqlite database and so I kept them in assets folder. The size of the images folder is 40mb. Since my project contains lot many images I have chosen assets folder instead of drawable folder. But when I kept the 40mb size folder in assets my emulator is showing error and my app is not running.
In Console:
Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE
[2011-12-09 11:47:16 - Mccee] Please check logcat output for more details.
[2011-12-09 11:47:16 - Mccee] Launch canceled!
In Logcat
12-09 11:44:03.210: WARN/NetworkManagementSocketTagger(89): setKernelCountSet(10041, 0) failed with errno -2
12-09 11:44:03.220: WARN/InputManagerService(89): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy#414013c0 (uid=10041 pid=1049)
12-09 11:44:03.340: WARN/ActivityManager(89): Activity idle timeout for ActivityRecord{413ba658 com.android.myproject/.Select}
12-09 11:44:05.840: WARN/ThrottleService(89): unable to find stats for iface rmnet0
What could be the reason. I have searched in google and tried many links...like keeping -partition-size 1024 in default emulator options but didnt worked. Also I have created new emulator with 1GB size but even then it didnt worked. Could you please help me regarding this.
Thanks in Advance....
Yes, You can place a folder of size 40MB in your asset folder, The error of emulator is for not sufficient internal size of emulator, try your application on device. Also If your application is large sized advice you to if possible save your application on SDcard.
Related
I am trying to implement OTA functionality for a msm8998 board running Android 8.1.
I've generated the OTA file and followed the standard way of doing it,
I've run into two problems, solving either one would solve the issue:
OTA size is bigger than /cache, therefore even though recovery can mount /cache, the image cannot fit there. How would I increase the /cache size, and is it a good idea to do so?
If I put the OTA zip in /data/ or /sdcard/, I have an error during recovery, seemingly it can't mount it. How would I make /data/ mountable?
...
Finding update package...
I:Update location: /data/update.zip
Opening update package...
E:Failed to mount /data: Invalid argument
E:Unable to open '/data/update.zip': No such file or directory
E:failed to map file
W:failed to read uncrypt status: No such file or directory
W:Failed to read /sys/class/thermal/thermal_zone28/temp: Invalid argument
W:Failed to read /sys/class/thermal/thermal_zone27/temp: Invalid argument
I:current maximum temperature: 44756
I:/data/update.zip
I:0
I:time_total: 0
I:retry: 0
I:temperature_start: 44814
I:temperature_end: 44756
I:temperature_max: 44814
I:
Installation aborted.
Turns out you have to use RecoverySystem.installPackage(...) method AND have the OTA file be in /data/.
Previously I had tried RecoverySystem.installPackage(...) method but with file in /sdcard/, and separately by setting /cache/recovery/command myself and using /data/
When using RecoverySystem.installPackage(...) and the file in /data/, seems uncrypt is run on it before reboot, and that makes the update accessible to the recovery.
I am downloading files from Internet but I am getting such error. on committing shared preference data
W/SharedPreferencesImpl: writeToFile: Got exception:
java.io.IOException: write failed: ENOSPC (No space left on device)
at libcore.io.IoBridge.write(IoBridge.java:501)
at java.io.FileOutputStream.write(FileOutputStream.java:316)
at com.android.internal.util.FastXmlSerializer.flushBytes(FastXmlSerializer.java:233)
at com.android.internal.util.FastXmlSerializer.flush(FastXmlSerializer.java:254)
at com.android.internal.util.FastXmlSerializer.endDocument(FastXmlSerializer.java:199)
at com.android.internal.util.XmlUtils.writeMapXml(XmlUtils.java:193)
at android.app.SharedPreferencesImpl.writeToFile(SharedPreferencesImpl.java:600)
at android.app.SharedPreferencesImpl.-wrap2(SharedPreferencesImpl.java)
at android.app.SharedPreferencesImpl$2.run(SharedPreferencesImpl.java:515)
at android.app.SharedPreferencesImpl.enqueueDiskWrite(SharedPreferencesImpl.java:536)
at android.app.SharedPreferencesImpl.-wrap0(SharedPreferencesImpl.java)
at android.app.SharedPreferencesImpl$EditorImpl.commit(SharedPreferencesImpl.java:458)
can anybody help me to solve this problem?
java.io.IOException: No space left on device means there is not enough memory left in internal storage your device. As I can see you have enough memory in your storage. Uninstall the app and install it again.If it is not working, try to install you app in SD card.
Add android:installLocation="preferExternal" in your manifest file.
I think installing the app in SD Card may solve your problem.
I am using gdb for dumping core file for an android process. I am running gdbserver on the device on tcp port and gdb client on the desktop. When i do gcore on client i get the below error.
Does any one know why i'm getting this error , any help much appreciated.
(gdb) gcore
Command not implemented for this target.
The reason i'm doing this to dump process memory and extract Classes.dex file from the memory using core file. I've tried doing this using /proc/pid/mem and proc/pid/maps and dump memory but that has too many mapped regions , i couldn't find the area where the Classes.dex file is. Any other alternate approach is also welcome. Thanks for your help.
First of all, you can only dump odex from memory (because dex compiled to odex for execute). But its not a big deal to convert odex to dex using baksmali-smali.
To find odex in memory you can use gdb for checking magic number for every begin-address of mapped memory(proc/pid/maps - first column):
gdb --batch --pid "pid_task" -ex x/s "mem_start"
So, when returned value equal to "dey\n036", you can dump this memory region via gdb.
Try to begin checking memory addresses from the end of file "proc/pid/maps", it will be much faster.
PS Sorry for my english, but hope it will help.
#Chris Stratton, the memory mapped classes.dex file will be different from the dex file inside apk on disk, for example in cases of packed dex files, some part of dex will be deobfuscated, question is to dump the memory mapped classes.dex file by getting the process memory.
You can use GameGuardian for this. Need root.
Memory editor tab - menu - memory dump - input 0-0 as range and folder - press ok - wait for toast Dump end.
Go to selected folder - open maps file - search needed odex in regions - remember start address of region - open GameGuardian - menu - memory dump - input remembered address in both field as range - press ok - wait for toast Dump end.
Now you have in your folder .bin file with dumped odex file.
Also you can find address in drop down list in GameGuardian UI. Press drop down icon on right with dump range field.
Here some video examples how to do this:
How to dump odex file from memory on Android -
GameGuardian
I am using Ignition (formerly known as DroidFu) to download images in the background and update related ImageViews when they are ready. I also wanted the images to be cached, so they would not have to be re-downloaded every time the user revisited that Activity. I noticed these errors in the log:
06-06 12:28:10.254: W/Droid-Fu[CacheFu](7567): Failed creating disk cache directory /mnt/sdcard/Android/data/my.package.name/cache/cachefu/image_cache
06-06 12:28:10.489: W/Droid-Fu[CacheFu](7567): Failed creating disk cache directory /mnt/sdcard/Android/data/my.package.name/cache/cachefu/image_cache
I discovered the directory for my package was not being created in Android/data on the SD card. I needed to add the WRITE_EXTERNAL_STORAGE permission to my AndroidManifest.xml; since I didn't need this elsewhere in the app, I had no idea I needed it for using RemoteImageViews and RemoteImageLoaders.
First: I'm not help vampire) I'm fighting with this issue for two days and I'm desperate to find solution. I've googled for the solution all over the inet and none is my case - this is the final stage and it feels hopeless.
To be clear: messing with AndroidManifest.xml doesn't help (no empty or unclosed tags etc). Nor app size issue (official limit is 4GB). Nor browser\system cause tried in FF, Chrome, IE 9 , Win 7, MacOSX SL 10.6.4, from my PC and from remote Server with Win2008 - same error.
Second - I extracted the AndroidManifest.xml from the APK file I submitted successfully (one with 13MB size) and extracted AndroidManifest.xml from the APK I'm trying to submit (yes, it's there! the size of this APK is 50MB) both with same apktool v 1.4.1. I compared the AndroidManifest.xml files with tortoise Diff - and the only difference between them is presence of android:targetSdkVersion="8" attribute in unuploadable APK and of course package name (diff only in .sub of com.mycompany.app.vers.sub - so i guess not a reason for this googlemare I'm having on ).
No way to give up on android:targetSdkVersion="8" - cause it can't be a reason for the error too.
Both APK were created with File -> Export -> Android -> Export Android Application with same keystore and key. I uploaded another app - third one with same AndroidManifest.xml as first one (without android:targetSdkVersion="8") but also of small size - 9MB, nothing bigger works((!
Help - I hate google and android now, almost :)
If you ran into the same problem I did with apktool, then please make sure you download the .jar file along with aapt.exe, that fixed it for me. I was running aapt.exe on an apk and got your above error, but it turns out I should have been running the apktool.bat file. The apktool.bat won't work if the .jar is not in the same directory. Get the jar file here: Android-APKTool
The maximum size of an Android app to be uploaded to Android Market is 50MB. If you're even one byte over this, I believe that the upload will fail. See this blog post for reference.