Emulate a ROM - Android Software Development

Is it possible to emulate an android ROM on a computer?

If you grab the SDK, you can run any version of Android in the emulator. If you want to run an actual ROM you will need to create an image of /system (as system.img) and replace that with those in the SDK folder.

thanks alot! that helped me alot
and yes, i want to run an actual ROM. what filesystem does it have to be?
was thinking about something like...
(cd PATH)
dd if=/dev/zero of=system bs=1024 count=#KB_needed
losetup /dev/loop0 system
mkfs -f FS /dev/loop0
(mkdir /mnt/system)
mount /dev/loop0 /mnt/system/
cp -a system /mnt/system/
umount /mnt/system/
losetup -d /dev/loop0
do you know any good tools for this exept for dd?

Never tried so I honestly don't know, you sound like you know a lot more than me about creating/mounting images than me, so it's probably best to use your judement. The easiest way is just to make a nadroid back backup, flash the ROM you want to test, nadroid that and grab system.img, revert to your old nandroid backup. It's tedious, and it doesn't help if you want to test a ROM before flashing, but that's the only method I've heard people use.

okay. thanks

HTC Sense UI system.img
Does anybody know where I can download a system.img for a HTC with Sense UI (Hero for example)? I have been looking for ages with no luck.
My app is not working on a customers Hero and I am trying to find a Hero system.img to run in the emulator so I can work out why it fails on this phone.
I dont own a Hero, so am unable to extract my own system.img.

You can get HTC official ROMs here:
http://forum.xda-developers.com/showthread.php?t=559622
if you've got a windows computer you probably could extract the content of this exe file and then try to follow my previous instructions to make the system.img.
And if you don't have an unix/linux box.. You could send the content of the exe file to me, if you are able to extract the data in it. (I'm in China with a netbook atm and not able to extract the exe file with my limited tools). Then I could try to make you a system.img

I tried that, but without an HTC phone connected to the PC USB the exe wont extract.

I take that back. I found the files in my temp folder. I have extracted ROM.zip including the system.img into the avd folder, but the emulator is failing to bring it up.

could you upload that zip file here or on rapidshare? then i could have a look at it

Here is the rom.zip file from RUU_Hero_HTC_WWE_2.73.405.38_WWE_release_signed_NoDriver.exe:
rom.zip
Other people must be doing this kindof thing to test their apps?
Here is the logcat. It looks like the sytem process is starting to come up, then fails. This repeats over and over.
12-16 18:34:20.945: INFO/SystemServer(113): Starting telephony registry
12-16 18:34:20.975: INFO/SystemServer(113): Starting Package Manager.
12-16 18:34:21.056: INFO/Installer(113): connecting...
12-16 18:34:21.075: INFO/installd(33): new connection
12-16 18:34:21.205: INFO/PackageManager(113): Got library com.google.android.maps in /system/framework/com.google.android.maps.jar
12-16 18:34:21.225: INFO/PackageManager(113): Got library com.google.android.gtalkservice in /system/framework/com.google.android.gtalkservice.jar
12-16 18:34:21.265: INFO/PackageManager(113): Got library com.htc.framework in /system/framework/com.htc.framework.jar
12-16 18:34:21.515: INFO/PackageManager(113): Got library android.awt in /system/framework/android.awt.jar
12-16 18:34:21.535: INFO/PackageManager(113): Got library android.test.runner in /system/framework/android.test.runner.jar
12-16 18:34:21.535: INFO/PackageManager(113): Got library com.android.im.plugin in /system/framework/com.android.im.plugin.jar
12-16 18:34:21.545: INFO/PackageManager(113): Got library com.htc.android.pimlib in /system/framework/com.htc.android.pimlib.jar
12-16 18:34:21.565: INFO/PackageManager(113): Got library com.htc.android.easopen in /system/framework/com.htc.android.easopen.jar
12-16 18:34:21.565: INFO/PackageManager(113): Got library com.scalado.util.ScaladoUtil in /system/framework/com.scalado.util.ScaladoUtil.jar
12-16 18:34:22.596: DEBUG/dalvikvm(113): GC freed 4273 objects / 216216 bytes in 302ms
12-16 18:34:23.476: ERROR/PackageManager(113): Adding duplicate shared user, keeping first: android.uid.shared
12-16 18:34:23.526: ERROR/PackageManager(113): Occurred while parsing settings at line -1, column -1
12-16 18:34:23.546: ERROR/PackageManager(113): Adding duplicate shared user, keeping first: com.htc.rosie.uid.shared
12-16 18:34:23.596: ERROR/PackageManager(113): Occurred while parsing settings at line -1, column -1
12-16 18:34:23.746: ERROR/PackageManager(113): Bad package setting: package com.android.providers.contacts has shared uid 10008 that is not defined
12-16 18:34:23.746: ERROR/PackageManager(113): Bad package setting: package com.android.launcher has shared uid 10008 that is not defined
12-16 18:34:23.756: ERROR/PackageManager(113): Bad package setting: package com.android.googlesearch has shared uid 10008 that is not defined
12-16 18:34:23.766: ERROR/PackageManager(113): Bad package setting: package com.android.inputmethod.latin has shared uid 10008 that is not defined
12-16 18:34:23.786: ERROR/PackageManager(113): Bad package setting: package com.htc.MusicWidget has shared uid 10047 that is not defined
12-16 18:34:23.816: ERROR/PackageManager(113): Bad package setting: package com.android.contacts has shared uid 10008 that is not defined
12-16 18:34:23.836: ERROR/PackageManager(113): Bad package setting: package com.android.providers.userdictionary has shared uid 10008 that is not defined
12-16 18:34:23.846: ERROR/PackageManager(113): Bad package setting: package com.android.providers.im has shared uid 10008 that is not defined
12-16 18:34:23.896: INFO/dalvikvm(113): DexOpt: Some deps went away
12-16 18:34:23.926: ERROR/dalvikvm(113): /system/framework/com.scalado.util.ScaladoUtil.jar odex has stale dependencies
12-16 18:34:23.926: ERROR/dalvikvm(113): odex source not available -- failing
12-16 18:34:23.926: WARN/dalvikvm(113): threadid=15: thread exiting with uncaught exception (group=0x40013140)
12-16 18:34:23.936: ERROR/AndroidRuntime(113): Uncaught handler: thread android.server.ServerThread exiting due to uncaught exception
12-16 18:34:23.956: ERROR/AndroidRuntime(113): *** EXCEPTION IN SYSTEM PROCESS. System will crash.
12-16 18:34:23.966: ERROR/AndroidRuntime(113): dalvik.system.StaleDexCacheError: /system/framework/com.scalado.util.ScaladoUtil.jar
12-16 18:34:23.966: ERROR/AndroidRuntime(113): at dalvik.system.DexFile.isDexOptNeeded(Native Method)
12-16 18:34:23.966: ERROR/AndroidRuntime(113): at com.android.server.PackageManagerService.<init>(PackageManagerService.java:419)
12-16 18:34:23.966: ERROR/AndroidRuntime(113): at com.android.server.PackageManagerService.main(PackageManagerService.java:261)
12-16 18:34:23.966: ERROR/AndroidRuntime(113): at com.android.server.ServerThread.run(SystemServer.java:126)
12-16 18:34:24.006: ERROR/AndroidRuntime(113): Crash logging skipped, no checkin service
12-16 18:34:24.006: ERROR/AndroidRuntime(113): Crash logging skipped, no htc checkin service
12-16 18:34:24.036: INFO/Process(113): Sending signal. PID: 113 SIG: 9
12-16 18:34:24.066: INFO/Zygote(102): Exit zygote because system server (113) has terminated
12-16 18:34:24.086: INFO/ServiceManager(26): service 'usagestats' died
12-16 18:34:24.086: INFO/ServiceManager(26): service 'SurfaceFlinger' died
12-16 18:34:24.086: INFO/ServiceManager(26): service 'power' died
12-16 18:34:24.086: INFO/ServiceManager(26): service 'batteryinfo' died
12-16 18:34:24.086: INFO/ServiceManager(26): service 'telephony.registry' died
12-16 18:34:24.106: ERROR/installd(33): eof
12-16 18:34:24.106: ERROR/installd(33): failed to read size
12-16 18:34:24.106: INFO/installd(33): closing connection
12-16 18:34:24.146: INFO/ServiceManager(26): service 'media.audio_flinger' died
12-16 18:34:24.146: INFO/ServiceManager(26): service 'media.player' died
12-16 18:34:24.146: INFO/ServiceManager(26): service 'media.camera' died
12-16 18:34:25.096: DEBUG/AndroidRuntime(130): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
12-16 18:34:25.116: DEBUG/AndroidRuntime(130): CheckJNI is ON
12-16 18:34:25.686: DEBUG/AndroidRuntime(130): --- registering native functions ---
12-16 18:34:25.956: INFO/(129): ServiceManager: 0xac38
12-16 18:34:25.956: DEBUG/AudioHardwareInterface(129): Running in emulation - using generic audio driver
12-16 18:34:25.956: INFO/AudioFlinger(129): Create BTIPSA2dpInterface
12-16 18:34:25.966: DEBUG/BTIPSA2dpInterface(129): BTIPSA2dpInterface 1.0.0.0.
12-16 18:34:25.966: DEBUG/BTIPSA2dpInterface(129): BTIPSA2dpInterface:penOutputStream 1, 0, 0
12-16 18:34:25.966: INFO/(129): Creating ashmem region names /data/btips/btips_mm_shm size 20480
12-16 18:34:25.966: INFO/AudioFlinger(129): AudioFlinger's thread ready to run for output 0
12-16 18:34:25.986: DEBUG/BTIPSA2dpInterface(129): BTIPSA2dpStreamOut::set 1, 0, 0
12-16 18:34:25.986: DEBUG/AudioFlinger(129): setRouting 0 2 -1, tid 129, calling tid 129
12-16 18:34:25.986: DEBUG/AudioFlinger(129): setRouting 1 2 -1, tid 129, calling tid 129
12-16 18:34:25.986: DEBUG/AudioFlinger(129): setRouting 2 1 -1, tid 129, calling tid 129
12-16 18:34:25.986: DEBUG/AudioFlinger(129): setMode to mode 0
12-16 18:34:25.996: INFO/AudioFlinger(129): AudioFlinger's thread ready to run for output 1
12-16 18:34:26.006: INFO/CameraService(129): CameraService started: pid=129
12-16 18:34:26.086: DEBUG/(130): ======================== register_android_graphics_Canvas, g_haveProfilerFile=0
12-16 18:34:26.476: INFO/Zygote(130): Preloading classes...
12-16 18:34:26.486: DEBUG/dalvikvm(130): GC freed 786 objects / 43096 bytes in 9ms
12-16 18:34:26.746: DEBUG/dalvikvm(130): GC freed 275 objects / 17264 bytes in 6ms
12-16 18:34:26.956: DEBUG/dalvikvm(130): GC freed 200 objects / 12200 bytes in 8ms
12-16 18:34:27.096: DEBUG/dalvikvm(130): Trying to load lib /system/lib/libmedia_jni.so 0x0
12-16 18:34:27.346: DEBUG/dalvikvm(130): Added shared lib /system/lib/libmedia_jni.so 0x0
12-16 18:34:27.356: DEBUG/dalvikvm(130): Trying to load lib /system/lib/libmedia_jni.so 0x0
12-16 18:34:27.356: DEBUG/dalvikvm(130): Shared lib '/system/lib/libmedia_jni.so' already loaded in same CL 0x0
12-16 18:34:27.366: DEBUG/dalvikvm(130): Trying to load lib /system/lib/libmedia_jni.so 0x0
12-16 18:34:27.366: DEBUG/dalvikvm(130): Shared lib '/system/lib/libmedia_jni.so' already loaded in same CL 0x0
12-16 18:34:27.386: DEBUG/dalvikvm(130): Trying to load lib /system/lib/libmedia_jni.so 0x0
12-16 18:34:27.386: DEBUG/dalvikvm(130): Shared lib '/system/lib/libmedia_jni.so' already loaded in same CL 0x0
12-16 18:34:27.396: DEBUG/dalvikvm(130): Trying to load lib /system/lib/libmedia_jni.so 0x0
12-16 18:34:27.396: DEBUG/dalvikvm(130): Shared lib '/system/lib/libmedia_jni.so' already loaded in same CL 0x0
12-16 18:34:27.426: DEBUG/dalvikvm(130): GC freed 467 objects / 29272 bytes in 10ms
Click to expand...
Click to collapse

Anybody?
Someone must have emulated HTC Touch / Sense UI?!

Okay... After unzipping and manipulating a 2.1 ROM to my liking; I have now resigned it...
Can someone please explain to me how I would go about testing it with the Android SDK Emulator?
I have already created a 2.1 AVD and the emulator loads to the "ANDROID" screen...
What must I do to test out this newly packaged ROM file?

Related

Slow Down / Hang / Auto-Reboot Every Few Days?

Hi all, I was wondering if it's common for any ROM to slow down after a few days of usage, sometimes resulting in an auto-reboot or the system hanging? Thank you . I have that every once in a while and was wondering if it's a common sentiment shared by all Android users?
For example, I can have it running for like 4 days straight with no issues, then when I try to send an SMS, or browse the internet, the phone hangs (and sometimes auto-reboots), usually with me removing and reinserting the battery.
I'm not sure if it could be due to any software/widget I'm running, will post a list up when I can.
Thanks!
yes, definitely happens to me also.
Probably depends on the applications you have. A lot of application are not really kind to our phone, resource wise...
I have a Magic SFR (vodafone, "google experience"), with non modified ROM.
It is really hard to precisely track the faulty applications. Even with spare parts,ddms,... I cannot get enough information (easily) to really know what happens exactly. (Though of course I already could spot some unwanted applications that were too demanding).
I hope that in next android releases, this will be improved (ways for user to better track apps behaviour)
Just an update on this issue, I noticed that there are 2 kinds of reboot. The normal startup sequence is:
1. HTC Magic
2. Android (or Hero/Whatever) Logo
3. Home
I've experienced a kind of reboot where it starts from the Android logo, without going back to the HTC Magic first. Also, it's really weird in that the "uptime" is not reset. In other words, if I've been using the phone for the past 3 hours and then it "reboots", typing uptime in terminal will still show 3 hours plus. It's like restarting explorer.exe in Windows, only that all the apps (that are supposed to auto-start) are reloaded as well.
The other kind of reboot is well, a reboot, starting from HTC Magic onwards.
Anyone else experience/experiencing this?
I managed to get some logs before the "reboot". Now I know it's a crash:
Code:
D/UpdateService( 520): Processing thread started
D/UpdateService( 520): >>>> Activate a backup alarm in 15 minutes in case of service crash
D/UpdateService( 520): 3 : not configured yet, so skipping update (nbInvalidUpdate = 21)
D/UpdateService( 520): 51 : delta since last forecast update is 27.0 min / update_period is 60.0 min
D/UpdateService( 520): 51 : doesn't need update
D/UpdateService( 2570): 33 : launch view update
D/UpdateService( 2570): 33 : providerName = org.koxx.pure_calendar.Cal4x4AppWidget
D/UpdateService( 520): 51 : next update at 1256667594000, in 32.0 min
D/UpdateService( 520): >>>> Requesting next update at 1256667594000, in 32.0 min <<<<
I/ActivityManager( 72): Stopping service: org.koxx.forecast_weather.v2/.UpdateService
D/dalvikvm( 2570): GC freed 5974 objects / 363472 bytes in 239ms
D/dalvikvm( 2548): GC freed 6568 objects / 307560 bytes in 332ms
D/UpdateService( 2570): 33 : updateAppWidget (push update to remote view)
D/UpdateService( 2570): 48 : delta since last forecast update is 2.0944426E7 min / update_period is 1440.0 min
D/UpdateService( 2570): 48 : need update
D/UpdateService( 2570): 48 : request calendar update
D/UpdateService( 2570): 48 : next update at 1256752018000, in 1439.0 min
D/UpdateService( 2570): 48 : launch view update
D/UpdateService( 2570): 48 : providerName = org.koxx.pure_calendar.Cal4x4AppWidget
D/dalvikvm( 2570): GC freed 4627 objects / 275512 bytes in 177ms
D/dalvikvm( 379): GC freed 3791 objects / 250552 bytes in 222ms
D/FileSystemProvider( 2548): getType uri:content://com.metago.astro.filesystem/sdcard/.org.koxx.pure_messenger query:null authority:com.metago.astro.filesystem shceme:content path:/sdcard/.org.koxx.pure_messenger
D/FileCreator( 2548): creatExtFile path:/sdcard/.org.koxx.pure_messenger
D/MenuDialog( 2548): PrepareToShow allenabled:true
E/dalvikvm-heap( 72): 512000-byte external allocation too large for this process.
E/ ( 72): VM won't let us allocate 512000 bytes
E/JavaBinder( 72): *** Uncaught remote exception! (Exceptions are not yet supported across processes.)
E/JavaBinder( 72): java.lang.OutOfMemoryError: bitmap size exceeds VM budget
E/JavaBinder( 72): at android.graphics.Bitmap.nativeCreateFromParcel(Native Method)
E/JavaBinder( 72): at android.graphics.Bitmap.access$000(Bitmap.java:29)
E/JavaBinder( 72): at android.graphics.Bitmap$1.createFromParcel(Bitmap.java:870)
E/JavaBinder( 72): at android.graphics.Bitmap$1.createFromParcel(Bitmap.java:876)
E/JavaBinder( 72): at android.widget.RemoteViews$ReflectionAction.<init>(RemoteViews.java:323)
E/JavaBinder( 72): at android.widget.RemoteViews.<init>(RemoteViews.java:490)
E/JavaBinder( 72): at android.widget.RemoteViews$1.createFromParcel(RemoteViews.java:905)
E/JavaBinder( 72): at android.widget.RemoteViews$1.createFromParcel(RemoteViews.java:908)
E/JavaBinder( 72): at com.android.internal.appwidget.IAppWidgetService$Stub.onTransact(IAppWidgetService.java:143)
E/JavaBinder( 72): at android.os.Binder.execTransact(Binder.java:287)
E/JavaBinder( 72): at dalvik.system.NativeStart.run(Native Method)
I/XT9IME ( 1963): [finishInput]
W/dalvikvm( 72): threadid=87: thread exiting with uncaught exception (group=0x4001da20)
E/AndroidRuntime( 72): Uncaught handler: thread Binder Thread #15 exiting due to uncaught exception
E/AndroidRuntime( 72): *** EXCEPTION IN SYSTEM PROCESS. System will crash.
Followed by many services dying and then the system reboots, uptime remains unchanged. I did some searching and found this: http://forum.xda-developers.com/showthread.php?p=4529939
So the problem in this case might be this: E/AndroidRuntime( 72): Uncaught handler: thread Binder Thread #15 exiting due to uncaught exception

Can't Flash - Can't create VM machine

Fellow tinkerers, hope you can help.
After flashing AOSP eclair 2.0 I'm now unable to flash anything else, I get the below error for any mod I try and install other than Eclair 2.0.
edit: I can no longer restore nandroid backups.
I can only install the default sappimg.nbh and AOSP eclair 2.0
I've tried to reroot the phone thinking maybe I lost root, but I can SU in terminal so I don't think that's the case
Tmobile MT3G (32B board)
HBOOT 1.33.0006
Tried Amon Ra and CM flash recovery
Any ideas?
Thanks.
Code:
D/AndroidRuntime( 2987): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 2987): CheckJNI is OFF
D/dalvikvm( 2987): DexOpt: incorrect opt magic number (0xff ff ff ff)
D/dalvikvm( 2987): Stale deps in cache file; removing and retrying
W/dalvikvm( 2987): Size mismatch on inflated file (5461131 vs 5455656)
E/dalvikvm( 2987): Unable to extract+optimize DEX from '/system/framework/framework.jar'
D/dalvikvm( 2987): Failed on '/system/framework/framework.jar' (boot=1)
D/dalvikvm( 2987): VM cleaning up
D/dalvikvm( 2987): LinearAlloc 0x0 used 4100 of 4194304 (0%)
W/dalvikvm( 2987): JNI_CreateJavaVM failed
E/AndroidRuntime( 2987): JNI_CreateJavaVM failed
D/AndroidRuntime( 2988):
Done some research and this issue has come up before
e.g. http://forum.xda-developers.com/showthread.php?t=565292
still no satisfactory solution, anyone any ideas?

[SOLVED] Cannot Update Market Enabler

So here is my problem. I have been running the latest Cyanogenmod (4.2.14.1) on my HTC Magic 32A, with Market Enabler v3.0 (I think, could be up to v3.2). The other day I tried uninstalling Market Enabler, and upgrading to v3.8. I deleted the existing Market Enabler files manually (/system/sd/app/com.androidiani.MarketEnabler.apk) and the corresponding dalvik-cache file, then rebooted and tried to install Market Enabler v3.8
Now when I try to install Market Enabler (I've tried v3.0, v3.2, and v3.8), I get this error: "MarketEnabler could not be installed on this phone"
I've checked in the applications management screen, and Market Enabler does not show up there. I even reflashed my cyanogenmod ROM and formatted my cache and dalvik-cache, and it still won't work. I have run out of ideas. Any help would be greatly appreciated.
Here is a log of a failed install of Market Enabler:
Code:
02-16 23:47:34.789 I/ActivityManager( 149): Starting activity: Intent { act=android.intent.action.VIEW cat=[android.intent.category.DEFAULT] dat=/sdcard/MarketEnabler_v3.0.8.apk28867.apk cmp=com.android.packageinstaller/.PackageInstallerActivity }
02-16 23:47:34.989 I/ActivityManager( 149): Start proc com.android.packageinstaller for activity com.android.packageinstaller/.PackageInstallerActivity: pid=1644 uid=10014 gids={}
02-16 23:47:35.669 I/PackageParser( 1644): Impliciting adding android.permission.WRITE_EXTERNAL_STORAGE to old pkg com.androidiani.MarketEnabler
02-16 23:47:35.669 I/PackageParser( 1644): Impliciting adding android.permission.READ_PHONE_STATE to old pkg com.androidiani.MarketEnabler
02-16 23:47:35.819 I/installd( 128): free_cache(336612) avail 209719296
02-16 23:47:36.039 I/ActivityManager( 149): Starting activity: Intent { dat=file:///data/data/com.android.packageinstaller/files/MarketEnabler_v3.0.8.apk28867.apk cmp=com.android.packageinstaller/.InstallAppConfirmation (has extras) }
02-16 23:47:36.049 W/InputManagerService( 149): Starting input on non-focused client [email protected] (uid=10014 pid=1644)
02-16 23:47:36.049 W/InputManagerService( 149): Client not active, ignoring focus gain of: [email protected]
02-16 23:47:36.099 I/ActivityManager( 149): Displayed activity com.android.packageinstaller/.PackageInstallerActivity: 1121 ms (total 1121 ms)
02-16 23:47:36.369 D/dalvikvm( 1644): GC freed 1563 objects / 122248 bytes in 136ms
02-16 23:47:36.389 I/PackageParser( 1644): Impliciting adding android.permission.WRITE_EXTERNAL_STORAGE to old pkg com.androidiani.MarketEnabler
02-16 23:47:36.389 I/PackageParser( 1644): Impliciting adding android.permission.READ_PHONE_STATE to old pkg com.androidiani.MarketEnabler
02-16 23:47:36.879 W/InputManagerService( 149): Starting input on non-focused client [email protected] (uid=10198 pid=1518)
02-16 23:47:36.989 I/ActivityManager( 149): Displayed activity com.android.packageinstaller/.InstallAppConfirmation: 881 ms (total 881 ms)
02-16 23:47:38.159 I/InstallAppConfirmation( 1644): result ok
02-16 23:47:38.209 I/ActivityManager( 149): Starting activity: Intent { dat=file:///data/data/com.android.packageinstaller/files/MarketEnabler_v3.0.8.apk28867.apk cmp=com.android.packageinstaller/.InstallAppProgress (has extras) }
02-16 23:47:38.279 W/InputManagerService( 149): Starting input on non-focused client [email protected] (uid=10014 pid=1644)
02-16 23:47:38.829 I/ActivityManager( 149): Displayed activity com.android.packageinstaller/.InstallAppProgress: 586 ms (total 586 ms)
02-16 23:47:39.269 D/PackageParser( 149): Scanning package: /data/app/vmdl74099.tmp
02-16 23:47:39.379 I/PackageParser( 149): Impliciting adding android.permission.WRITE_EXTERNAL_STORAGE to old pkg com.androidiani.MarketEnabler
02-16 23:47:39.379 I/PackageParser( 149): Impliciting adding android.permission.READ_PHONE_STATE to old pkg com.androidiani.MarketEnabler
02-16 23:47:41.079 E/PackageManager( 149): Package com.androidiani.MarketEnabler signatures do not match the previously installed version; ignoring!
02-16 23:47:41.109 W/PackageManager( 149): Package couldn't be installed in /data/app/com.androidiani.MarketEnabler.apk
02-16 23:47:41.709 D/dalvikvm( 149): GC freed 9334 objects / 508664 bytes in 594ms
02-16 23:47:47.559 D/ ( 1644): unable to unlink '/data/data/com.android.packageinstaller/files/MarketEnabler_v3.0.8.apk28867.apk': No such file or directory (errno=2)
02-16 23:47:48.089 I/ActivityManager( 149): Process com.android.packageinstaller (pid 1644) has died.
-=Edit=-
So I ended up running $ adb uninstall com.androidiani.MarketEnabler again, (which previously resulted in "Failure"), but this time it actually worked. Now I can install MarketEnabler again.

[Q] Why Edited HTC_IME.apk Force Close

Hi,
I'm trying to edit the HTC_IME.apk that came from tha "Deodexed" package to change the FR Azerty keyboard to a QWERTY one.
I extract the APK with apktool: "apktool d HTC_IME.apk c:\HTC_IME\"
I then replace the content of the 2 (portrait and landscape) XML file of the keyboard layout to have what I want.
I repack the APK with apktool: "apktool b c:\HTC_IME\ c:\HTC_IME.apk"
I then re-sign the new package with the autosign.bat utility.
I push it in /system/app to replace the original one that came with the "RodriguezStyle_MoDaCoMoDrOm_V2-3_FIX_Vivid_Sense_A2SD" rom and reboot the phone.
It's all seem ok but as soon as I start the keyboard I get a force close.
I've also try to modify the htc_ime_lo mod by jonasl but it does the same thing. I can install it but as soon as it try to start, force close
Does I have missed something about editing XML file of an APK ? It's the first time I try.
EDIT:
I know it's possible, they do it in the apktool demo!! youtube.com/watch?v=1Aa9zsh6F7A
Thanks !
mr_sarge said:
Hi,
I'm trying to edit the HTC_IME.apk that came from tha "Deodexed" package to change the FR Azerty keyboard to a QWERTY one.
I extract the APK with apktool: "apktool d HTC_IME.apk c:\HTC_IME\"
I then replace the content of the 2 (portrait and landscape) XML file of the keyboard layout to have what I want.
I repack the APK with apktool: "apktool b c:\HTC_IME\ c:\HTC_IME.apk"
I then re-sign the new package with the autosign.bat utility.
I push it in /system/app to replace the original one that came with the "RodriguezStyle_MoDaCoMoDrOm_V2-3_FIX_Vivid_Sense_A2SD" rom and reboot the phone.
It's all seem ok but as soon as I start the keyboard I get a force close.
I've also try to modify the htc_ime_lo mod by jonasl but it does the same thing. I can install it but as soon as it try to start, force close
Does I have missed something about editing XML file of an APK ? It's the first time I try.
Thanks !
Click to expand...
Click to collapse
I'm using it in the hd2 and I installed HTC_ime.apk and clicker.apk
Sent from my HTC HD2 using Tapatalk
Forgot to tell that I have a HTC Legend from Virgin that came with a QWERTY French HTC_IME.
But can't get it with any custom rom since "French (Canada)" is not a choice in the language option. I've downloaded "morelocale 2" to set Fr_CF but it don't give the QWERTY French keyboard.
If I put an umnodified HTC_IME.apk in /system/app or try to instal unmodified HTC_IME_lo.apk (Jonasl mod) it work.
If I try to rebuild one, changing "land_qwery_fr.xm"l and "qwerty_fr.xml" in "/res/xml/" so that when my HTC is in French, my keyboard appear in QWERTY produce the error each time I try.
Just tested it in the Android Emulator. The keyboard still fail with "The application HTC_IME mod (process jonasl.ime) has stopped unexpectedly. Please try again"
Same thing with the original HTC_IME.apk with edited qwerty_fr.xml file.
I don't know what is wrong...
Me again,
Juste tested decompile-recompile-signing without doing anything to the file and the keyboard crash in US and in French.
Why I'm not able to reocompile this APK !
few steps
Did you try to look at the difference of sizes of the .apk package? sometimes a device wants uncompressed apk, when apktool always compress it.
Try to just pull the .apk resign it and push it back, if it crashes it may mean that the rom rejects its signature and you should resign all /system/app and /system/framework directories with the same key.
And you always can look at logcat to identify the problem( by reading the stack trace) which can tell you where there is a problem inside the flow of the program- just in case you edited something you shouldnt
I've just resign HTC_IME_lo.apk without decompile and recompiling it and the apk work.
I will put the log here because I'm not sure what to check !
Ho, and when I compile the apk back, I got some error:
Code:
>apktool b HTC_IME\
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'kb_tutorial_fuzzy_body' has no default translation in C:\Users\SaRgE\Desktop\apktool1.3.2\HTC_IME\res; found: no
aapt: warning: string 'kb_tutorial_fuzzy_title' has no default translation in C:\Users\SaRgE\Desktop\apktool1.3.2\HTC_IME\res; found: no
aapt: warning: string 'kb_tutorial_longpress_body' has no default translation in C:\Users\SaRgE\Desktop\apktool1.3.2\HTC_IME\res; found: no
aapt: warning: string 'kb_tutorial_longpress_title' has no default translation in C:\Users\SaRgE\Desktop\apktool1.3.2\HTC_IME\res; found: no
aapt: warning: string 'kb_tutorial_main_desc' has no default translation in C:\Users\SaRgE\Desktop\apktool1.3.2\HTC_IME\res; found: no
aapt: warning: string 'kb_tutorial_main_title' has no default translation in C:\Users\SaRgE\Desktop\apktool1.3.2\HTC_IME\res; found: no
aapt: warning: string 'keyboard_ime_settings_fqwerty_space_title' has no default translation in C:\Users\SaRgE\Desktop\apktool1.3.2\HTC_IME\res; found: no
aapt: warning: string 'main_menu_title' has no default translation in C:\Users\SaRgE\Desktop\apktool1.3.2\HTC_IME\res; found: no
aapt: warning: string 'vibration_feedback' has no default translation in C:\Users\SaRgE\Desktop\apktool1.3.2\HTC_IME\res; found: no
I: Copying libs...
I: Building apk file...
C:\Users\SaRgE\Desktop\apktool1.3.2>
Here's the log. I didn't touch anything. Only decompile-recompile-sign:
Code:
I/ActivityManager( 67): Start proc jonasl.ime for service jonasl.ime/.HTCIMEService: pid=613 uid=10028 gids={1015}
W/InputManagerService( 67): Window already focused, ignoring focus gain of: [email protected]
D/dalvikvm( 613): Trying to load lib /data/data/jonasl.ime/lib/libt99.so 0x43d0c108
D/dalvikvm( 613): Added shared lib /data/data/jonasl.ime/lib/libt99.so 0x43d0c108
I/XT9_C ( 613): File "/data/data/jonasl.ime/udb" does not exist.
I/XT9_C ( 613): [loadDefaultRUDB] RUDB size = 20480 (loaded)
I/XT9_C ( 613): [RegisterXT9MDB] MDB size=64 (loaded)
I/XT9_C ( 613): Load mdbType=0 time=0.001671(sec)
I/XT9_JNI ( 613): [Java_T9_nativeLoad] Native side initialization done.
W/WindowManager( 67): Attempted to add window with non-application token WindowToken{43d320f8 token=null}. Aborting.
I/HTC_IME ( 613): onCreateInputView
D/ ( 613): unable to unlink '/data/data/jonasl.ime/shared_prefs/jonasl.i
me_preferences.xml.bak': No such file or directory (errno=2)
I/XT9_JNI ( 613): [Java_T9_nativeLoad] Native side is already initiated.
I/XT9_JNI ( 613): [Java_T9_nativeLoad] Native side is already initiated.
W/ResourceType( 613): No package identifier when getting name for resource number 0x00000000
E/Keyboard( 613): Parse error:android.content.res.Resources$NotFoundException:String resource ID #0x0
D/AndroidRuntime( 613): Shutting down VM
W/dalvikvm( 613): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
E/AndroidRuntime( 613): Uncaught handler: thread main exiting due to uncaught exception
D/dalvikvm( 613): GC freed 3558 objects / 280264 bytes in 138ms
E/AndroidRuntime( 613): java.lang.NullPointerException
E/AndroidRuntime( 613): at com.htc.android.htcime.ezsip.EZSIPView.setKeyboard(EZSIPView.java:114)
E/AndroidRuntime( 613): at com.htc.android.htcime.ezsip.PortQwertySIPView.setKeyboardbyLang(PortQwertySIPView.java:129)
E/AndroidRuntime( 613): at com.htc.android.htcime.ezsip.PortQwertySIPView.init(PortQwertySIPView.java:78)
E/AndroidRuntime( 613): at com.htc.android.htcime.util.CodeIMEFinder.loadAllIME(CodeIMEFinder.java:117)
E/AndroidRuntime( 613): at com.htc.android.htcime.HTCIMEService.execOnceAtBoot(HTCIMEService.java:1771)
E/AndroidRuntime( 613): at com.htc.android.htcime.HTCIMEService.onCreateInputView(HTCIMEService.java:176)
E/AndroidRuntime( 613): at android.inputmethodservice.InputMethodService.updateInputViewShown(InputMethodService.java:950)
E/AndroidRuntime( 613): at android.inputmethodservice.InputMethodService.showWindowInner(InputMethodService.java:1303)
E/AndroidRuntime( 613): at android.inputmethodservice.InputMethodService.showWindow(InputMethodService.java:1278)
E/AndroidRuntime( 613): at android.inputmethodservice.InputMethodService$InputMethodImpl.showSoftInput(InputMethodService.java:388)
E/AndroidRuntime( 613): at android.inputmethodservice.IInputMethodWrapper.executeMessage(IInputMethodWrapper.java:148)
E/AndroidRuntime( 613): at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:45)
E/AndroidRuntime( 613): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 613): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 613): at android.app.ActivityThread.main(ActivityThread.java:4363)
E/AndroidRuntime( 613): at java.lang.reflect.Method.invokeNative(NativeMethod)
E/AndroidRuntime( 613): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 613): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime( 613): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/AndroidRuntime( 613): at dalvik.system.NativeStart.main(Native Method)
I/Process ( 67): Sending signal. PID: 613 SIG: 3
I/dalvikvm( 613): threadid=7: reacting to signal 3
E/dalvikvm( 613): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
I/Process ( 706): Sending signal. PID: 706 SIG: 9
I/ActivityManager( 67): Process jonasl.ime (pid 706) has died.
W/ActivityManager( 67): Service crashed 2 times, stopping: ServiceRecord{43cb4aa8 jonasl.ime/.HTCIMEService}
And here's the log when the apps is working (before I try to decompile/reompile it):
Code:
I/ActivityManager( 67): Start proc jonasl.ime for service jonasl.ime/.HTCIMEService: pid=957 uid=10028 gids={1015}
D/dalvikvm( 957): Trying to load lib /data/data/jonasl.ime/lib/libt99.so 0x43d0c108
D/dalvikvm( 957): Added shared lib /data/data/jonasl.ime/lib/libt99.so 0x43d0c108
I/XT9_C ( 957): File "/data/data/jonasl.ime/udb" does not exist.
I/XT9_C ( 957): [loadDefaultRUDB] RUDB size = 20480 (loaded)
I/XT9_C ( 957): [RegisterXT9MDB] MDB size=64 (loaded)
I/XT9_C ( 957): Load mdbType=0 time=0.001726(sec)
I/XT9_JNI ( 957): [Java_T9_nativeLoad] Native side initialization done.
W/WindowManager( 67): Attempted to add window with non-application token WindowToken{43d320f8 token=null}. Aborting.
I/HTC_IME ( 957): onCreateInputView
D/ ( 957): unable to unlink '/data/data/jonasl.ime/shared_prefs/jonasl.ime_preferences.xml.bak': No such file or directory (errno=2)
I/XT9_JNI ( 957): [Java_T9_nativeLoad] Native side is already initiated.
I/XT9_JNI ( 957): [Java_T9_nativeLoad] Native side is already initiated.
D/dalvikvm( 957): GC freed 3655 objects / 280792 bytes in 147ms
I/HTC_IME_jonasl( 957): Current language not set, defaulting to 0 English
E/ActivityThread( 957): Failed to find provider info for customization_settings
E/ActivityThread( 957): Failed to find provider info for customization_settings
E/ActivityThread( 957): Failed to find provider info for customization_settings
E/ActivityThread( 957): Failed to find provider info for customization_settings
D/dalvikvm( 957): Trying to load lib /system/lib/libsoundpool.so 0x0
D/dalvikvm( 957): Added shared lib /system/lib/libsoundpool.so 0x0
W/Resources( 957): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f090195}
W/Resources( 957): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f090196}
D/dalvikvm( 957): GC freed 4366 objects / 388072 bytes in 41ms
I/XT9_C ( 957): [RegisterXT9MDB] MDB size=22112 (loaded)
I/XT9_C ( 957): Load mdbType=1 time=0.002322(sec)
D/dalvikvm( 957): GC freed 5519 objects / 327536 bytes in 72ms
try to use apktool 1.1
skoperst said:
try to use apktool 1.1
Click to expand...
Click to collapse
1.1 is throwing a lot or erroe like:
Code:
C:\Users\SaRgE\Desktop\apktool1.1.0\HTC_IME\smali\com\htc\android\htcime\R$string.smali[434,49] [smali_file, field, nonvoid_type_descriptor] mismatched input [@3068,14631:14632=':I',<158>,434:49] expecting set null
C:\Users\SaRgE\Desktop\apktool1.1.0\HTC_IME\smali\com\htc\android\htcime\R$string.smali[436,49] [smali_file, field, nonvoid_type_descriptor] mismatched input [@3081,14699:14700=':I',<158>,436:49] expecting set null
C:\Users\SaRgE\Desktop\apktool1.1.0\HTC_IME\smali\com\htc\android\htcime\R$string.smali[438,49] [smali_file, field, nonvoid_type_descriptor] mismatched input [@3094,14767:14768=':I',<158>,438:49] expecting set null
C:\Users\SaRgE\Desktop\apktool1.1.0\HTC_IME\smali\com\htc\android\htcime\R$string.smali[440,49] [smali_file, field, nonvoid_type_descriptor] mismatched input [@3107,14835:14836=':I',<158>,440:49] expecting set null
C:\Users\SaRgE\Desktop\apktool1.1.0\HTC_IME\smali\com\htc\android\htcime\R$string.smali[442,49] [smali_file, field, nonvoid_type_descriptor] mismatched input [@3120,14903:14904=':I',<158>,442:49] expecting set null
C:\Users\SaRgE\Desktop\apktool1.1.0\HTC_IME\smali\com\htc\android\htcime\R$string.smali[444,49] [smali_file, field, nonvoid_type_descriptor] mismatched input [@3133,14971:14972=':I',<158>,444:49] expecting set null
Maybe try apk manager
Already Tried it and it doeas the same thing. I've notified Brutt.All, the apktool creator. He have a bug with the latest version of apktool. see here: http://code.google.com/p/android-apktool/issues/detail?id=100
I will wait for is new version to see if it work.
Thanks
Have you solved the problem. I try to mod HTC_IME and has the same problem - repacked keyboard closes if you try to use it.

[Q] Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE

I was working on an app and after I uploaded a *.ttf to the assets folder I went to run my app in the android emulator. It uploaded okay but during installation I got
[2011-08-03 14:36:37 - katastroapp] Installing katastroapp.apk...
[2011-08-03 14:36:40 - katastroapp] Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE
[2011-08-03 14:36:40 - katastroapp] Please check logcat output for more details.
[2011-08-03 14:36:41 - katastroapp] Launch canceled!
Here is my logcat
08-03 21:34:12.316: DEBUG/SntpClient(59): request time failed: java.net.SocketException: Address family not supported by protocol
08-03 21:36:37.893: DEBUG/AndroidRuntime(395): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
08-03 21:36:37.893: DEBUG/AndroidRuntime(395): CheckJNI is ON
08-03 21:36:38.183: DEBUG/AndroidRuntime(395): --- registering native functions ---
08-03 21:36:39.613: DEBUG/dalvikvm(247): GC_EXPLICIT freed 158 objects / 7584 bytes in 80ms
08-03 21:36:39.793: DEBUG/dalvikvm(59): GC_EXPLICIT freed 1624 objects / 73120 bytes in 145ms
08-03 21:36:39.904: DEBUG/AndroidRuntime(395): Shutting down VM
08-03 21:36:39.904: DEBUG/dalvikvm(395): Debugger has detached; object registry had 1 entries
08-03 21:36:39.943: INFO/AndroidRuntime(395): NOTE: attach of thread 'Binder Thread #3' failed
08-03 21:39:12.383: DEBUG/SntpClient(59): request time failed: java.net.SocketException: Address family not supported by protocol
If anyone knows whats up with that I would be greatly helped.
I figured it out, I just didnt give my emulator enough memory. stupid easy fix.

Categories

Resources