Vanilla Keyboard Help - Hero CDMA Q&A, Help & Troubleshooting

I'm trying to put together a vanilla keyboard that works for most 2.1 roms (Im using Fresh rom right now).
I tried ripping the LatinIME.apk out of darchdroid but it failed to install. Here's the logcat, what am I missing?
Code:
E/PackageManager( 295): Package com.android.inputmethod.latin has no signatures that match those in shared user android.uid.shared; ignoring!
W/PackageManager( 295): Package couldn't be installed in /data/app/com.android.inputmethod.latin.apk

Mod. edit: not rom dev related, moved to q&a

Pull out the LatianIME.apk under system/app and push it to your phone
Then you need to lib files they are libjni_latinime.so and libjni_pinyinime.so
and it should work

killerxx2 said:
Pull out the LatianIME.apk under system/app and push it to your phone
Then you need to lib files they are libjni_latinime.so and libjni_pinyinime.so
and it should work
Click to expand...
Click to collapse
I pulled those files from DarchDroid and pushed them to /system/lib and /system/app respectively but I still don't get the option to enable LatinIME in text inputs.

giovannizero said:
Code:
E/PackageManager( 295): Package com.android.inputmethod.latin has no signatures that match those in shared user android.uid.shared; ignoring!
W/PackageManager( 295): Package couldn't be installed in /data/app/com.android.inputmethod.latin.apk
Click to expand...
Click to collapse
As u can see ur having a shared uuid issue where the system is flat out rejecting that apk. the reason being its not signed with the same keys as all the other apks in /system/framework and /system/app. to remedy this issue, u will need to resign ALL the apks in /system/app and /system/framework with testkeys. by signing them, i mean sign each individual apk like u would a rom.

Related

Dexopt Wrapper

I'm sure most of you know that optimization using dexopt wrapper creates an odex file but removes the classes.dex file in the apk. My question is, how do you remove that .odex file and change it back to a classes.dex file? I'm wondering because once I have a classes.dex file I'm going to disassemble it with baksmali see what I can do and figure out. Any help is appreciated, thanks.
alritewhadeva said:
I'm sure most of you know that optimization using dexopt wrapper creates an odex file but removes the classes.dex file in the apk. My question is, how do you remove that .odex file and change it back to a classes.dex file? I'm wondering because once I have a classes.dex file I'm going to disassemble it with baksmali see what I can do and figure out. Any help is appreciated, thanks.
Click to expand...
Click to collapse
dexopt-wrapper does not remove the dex file from the apk, unless we do it different ways, i run dexopt-wrapper ***.apk ***.odex from adb. how do you do it? and anyway, if you used dexopt-wrapper, just get the rom you flashed before doing dexopt-wrapper and you should have the full apks already in there
I'm trying to get a classes.dex file from the Phone.apk from hero builds .As you can see in my signature I'm working on porting the HTC Dialer to cupcake builds. The Phone.apk included in JaCHero2.63 just doesn't have the .dex file ,but it has the .odex file. All apks in that build that are optimized with odex do NOT have a classes.dex file in the original apk file. I'm wondering if it's possible to merge the .odex and the .apk so i can get a workable classes.dex file.

[solved]Editing and installing apk's

To install an edited apk-
-If you open up the apk with
Ninjamorph free as a new project, and make your changes.
-Use a file explorer and goto android themes>workspace>"edited apk" and delete meta-inf.
-Then back to ninjamorph, select finish project to zip it back up but DON'T INSTALL !!
-Use
Signapktic free with platform key to sign it. Uninstall the original apk and install your new edited apk.
Hope this helps
You cannot use that method on market apps. It only works with system apps.
tristan202 said:
You cannot use that method on market apps. It only works with system apps.
Click to expand...
Click to collapse
Use which method? What do you suggest to do?
dully79 said:
Use which method? What do you suggest to do?
Click to expand...
Click to collapse
You can't just edit the apk or use metamorph on market apps. If edited, they need to be resigned. Not sure if signing with a testkey is sufficient.
Just tried editing then resigning market apps works with non-protected apps
tristan202 said:
You can't just edit the apk or use metamorph on market apps. If edited, they need to be resigned. Not sure if signing with a testkey is sufficient.
Click to expand...
Click to collapse
I'm not trying to use metamorph, that's for themes not icons.
I've tried deleting the meta inf and resigning the apk's with my own key but it still doesn't work.
I've managed to edit them like I described above by installing them as system apps, but I don't want in the system.
Surely there must be a way? Where's the apps2sd directory?
you can edit market apps, then resign them. you must uninstall the app on your phone before installing the modified one, because it is signed with a different key. once the old one is uninstalled every method of installation should work fine for the modified one.
you can edit system apps, just don't unzip or resign them. but you figured that out already.
kendong2 said:
you can edit market apps, then resign them. you must uninstall the app on your phone before installing the modified one, because it is signed with a different key. once the old one is uninstalled every method of installation should work fine for the modified one.
you can edit system apps, just don't unzip or resign them. but you figured that out already.
Click to expand...
Click to collapse
Can I use one of the many autosign keys, or do I need to generate my own?
If so do I need to generate different keys for different apks or can I use the same key?
Problem solved!!
I deleted the meta-info and signed the apk manually using stericsons auto sign tool, I did try auto signing but the apk wouldnt install.
Thanks people for your help!
Hi all...not sure what I'm doing wrong...if someone could point out my mistake(s) I would greatly appreciate it!
01) Right click on original.apk and open with 7zip
02) Navigate to res/drawable-hdpi
03) Right click the .png files and select 'edit' (the edit option points them to Paint.net)
04) Edit the .png files and save (not sure if this matters, but when I close Paint.net I get a msg saying that the *.png has been changed, would you like to update the archive...if I click yes, it puts an 'a' in the attributes column...if I click cancel it does not save the changes I made)
05) Close the archive and open autosign.bat
06) Choose 'manually sign'
07) type in c;\AndroidSDK\tools\original.apk and I get the following:
**************
Signing File!
**************
Exception in thread "main" java.lang.NoClassDefFoundError: testsign
Caused by: java.lang.ClassNotFoundException: testsign
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: testsign. Program will exit.
File signed successfully if no Errors above.
I copied the apk to my sdcard and tried to install anyways and I get the application not installed message...
The apk I am editing is someone elses edit of a theme...I just changed the colors of 6 of the png files...if I try to install the one that I have before I edit, it works fine...but once I make my changes it doesn't like something I am doing...
Any help would be appreciated!
Thank you,
SixTen
gszeman said:
Hi all...not sure what I'm doing wrong...if someone could point out my mistake(s) I would greatly appreciate it!.....
Click to expand...
Click to collapse
First let me say I have no experiance with what your trying to do,... Just trying to learn the theory 1st.
Have you made a note of these points,...
kendong2 said:
you must uninstall the app on your phone before installing the modified one, because it is signed with a different key
Click to expand...
Click to collapse
kendong2 said:
you can edit system apps, just don't unzip or resign them. but you figured that out already.
Click to expand...
Click to collapse
I'm assuming a theme would be a system app, not a market app.
So try uninstalling the theme, then reinstalling again.
If that fails,...
dully79 said:
Problem solved!!
I deleted the meta-info and signed the apk manually using stericsons auto sign tool, I did try auto signing but the apk wouldnt install.
Click to expand...
Click to collapse
Any luck with that???
Actually,... If your not resigning your theme then It would still be the same key wouldn't it. So the Kendong quote I used isn't applicable to you is it. Sorry.
kendong2 said:
you can edit market apps, then resign them. you must uninstall the app on your phone before installing the modified one, because it is signed with a different key.
Click to expand...
Click to collapse
So really you need to figure out how to do this properly dont you,... and have the changes you made keep saved.
kendong2 said:
you can edit system apps, just don't unzip or resign them. but you figured that out already.
Click to expand...
Click to collapse
So,.... I'v just wasted my time as I've been no use to you at all. Good luck though.
gszeman,
Have you got JDK installed and the correct classpath set?
dully79 said:
gszeman,
Have you got JDK installed and the correct classpath set?
Click to expand...
Click to collapse
Doh,... I forgot to put the path stuff, good call Dully.
phaelox said:
Setting up SignAPK
First, make sure you have Java installed. If not go to www.java.com to install it.
Second, I recommend to unzip the SignAPK_xda.zip file to C:\SignAPK.
Lastly, add the signapk folder to your PATH environment variable:
[*]Go to Control Panel, System
[*]Click on "Advanced" (or "Advanced System Settings")
[*]Click the button "Environment Variables..."
[*]Locate the PATH variable under "User Variables" (or "System variables" if you want to use SignAPK under other user accounts) and double-click it to edit
[*]In the "Variable Value" field, at the end of the line, type a semi-colon and the path to the signapk files ;C:\SignAPK
[*]You could also add the path to your java.exe file here if you have troubles with running signapk.​
Click to expand...
Click to collapse
moved to first post
Thanks.
(Bookmarked for future ref)
you might wanna mark the thread title with [SOLVED] or something...
hi all want to ask if i can do the same with doom for android apk. ?
also wanted to HEX change the urls where it loooks for libdoom_jni.so . and it cant find it because google toke down the site, so i uploaded my own libdoom_jni.so so wantet to change url in apk and resign. but it says !cant install on this phone!
i did try other sites with same subject, open apk archive (no extract) change png icons, and resign again.
deluxive said:
hi all want to ask if i can do the same with doom for android apk. ?
also wanted to HEX change the urls where it loooks for libdoom_jni.so . and it cant find it because google toke down the site, so i uploaded my own libdoom_jni.so so wantet to change url in apk and resign. but it says !cant install on this phone!
i did try other sites with same subject, open apk archive (no extract) change png icons, and resign again.
Click to expand...
Click to collapse
it'll be perfect if possible. I would love to play that game. Have you succeeded in finding the url and replacing it with yours?
Okay...so I have followed the instructions and the apk will not load. I changed some png files in my settings.apk and when I load it...it vanishes completely.
Any ideas what am missing?

Replacing the Touchwiz Calendar possbile?

Hey Guys,
I have got the SGS for a couple of days now and i am very happy with it.
Phone is rooted and on Stock JF3 Firmware.
But there is one thing that is bothering me, the Touchwiz Calendar can't handle multiple alarms for one Event.
I have tried to replace it with the original Google Calendar from another Eclair Rom but didn't succeed.
When trying to install i allways get Installation Failed.
Any Ideas?
It's also pretty ugly.
I was looking for a calendar app to replace it with, but didn't find anything good.
try just to paste it to /system/app
You should also use the apk from
a dump.
If you attach the file to youre post i will try to get it working. Greets
Sent from my GT-I9000 using Tapatalk
Ok, i took the Calendar Files of a Nexus One System Dump, placed them under /system/app with the right Permissions and removed the TouchWizCalendar.
But it still dosen't show up in the Launcher.
I have attached the Files i used.
Thanks for the Help!
After removing the Touchwiz Files i found the following Errors in logcat:
W/PackageManager( 2251): Couldn't remove dex file for package: com.android.calendar at location /system/app/TouchWizCalendar.apk, retcode=-1
W/PackageManager( 2251): Package:com.android.calendar is not disabled
E/PackageManager( 2251): Package com.android.calendar has no signatures that match those in shared user android.uid.calendar; ignoring!
W/PackageManager( 2251): Couldn't remove dex file for package: com.android.providers.calendar at location /system/app/TouchWizCalendarProvider.apk, retcode=-1
W/PackageManager( 2251): Package:com.android.providers.calendar is not disabled
E/PackageManager( 2251): Package com.android.providers.calendar has no signatures that match those in shared user android.uid.calendar; ignoring!
W/AppSecurityPermissions( 2420): Could'nt retrieve permissions for package:com.android.calendar
After renaming the original Calendar Files to the Touchwiz Filenames i now only get one error:
E/PackageManager( 2251): Package com.android.calendar has no signatures that match those in shared user android.uid.calendar; ignoring!
But still not working, maybe this might help.
el_tom said:
Ok, i took the Calendar Files of a Nexus One System Dump, placed them under /system/app with the right Permissions and removed the TouchWizCalendar.
But it still dosen't show up in the Launcher.
I have attached the Files i used.
Thanks for the Help!
Click to expand...
Click to collapse
I have found another post on XDA that suggests using another calendar app, in addition to the one you have listed.

[Q] How to edit framework-res.apk?

I'm trying to edit framework-res.apk so I can theme my rom. Are these the correct steps?
pull framework-res.apk from my phone
decompile the apk
make the changes
rebuild the apk
sign
zipalign
push apk back to device
I'm not too sure on this method as after I pushed back my modified apk, I get a load of force close errors
Any advice would be welcome
don't sign and don't zipalign and all are fine
I tried without sign and zipalign but the rom wouldnt boot. If I sign, I get force close errors
Does the rom need to be deoxed?
How is your process to decompile and recompile what tools do you use
vibez said:
I tried without sign and zipalign but the rom wouldnt boot. If I sign, I get force close errors
Does the rom need to be deoxed?
Click to expand...
Click to collapse
Sent from my GT-I9000 using XDA App
Is this an ODEXed ROM or a deOXEDed ROM? You can't mix and match. If you're not ODEXing any APKs after you've modified them then you need to make sure all APKs are deOXEDed.
setenza01 said:
How is your process to decompile and recompile what tools do you use
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
I use apk manager to decompile and rebuild
Benjamin Dobell said:
Is this an ODEXed ROM or a deOXEDed ROM? You can't mix and match. If you're not ODEXing any APKs after you've modified them then you need to make sure all APKs are deOXEDed.
Click to expand...
Click to collapse
It is a stock rom but there is no framework-res.odex does that mean it doesn't need deodexing even though there are odex files for every other apk in my system folder?
maybe this little monster is some help to you:
http://forum.xda-developers.com/showthread.php?p=7377678#post7377678
FadeFx said:
maybe this little monster is some help to you:
http://forum.xda-developers.com/showthread.php?p=7377678#post7377678
Click to expand...
Click to collapse
Nice app but this theme also needs .xml changes which this app doesnt support
ok, i put him a note in his thread about the xml changing issue, we will see what hes answer will be...
edit:
also this software could do the trick: http://android.modaco.com/content/t-mobile-pulse-pulse-modaco-com/302404/ande-android-design-editor/
I've been playing around a little more today and it seems the issue is that no tool can rebuild the xml files correctly, they seem to be compressed/encoded.
Has anyone been able to edit an xml file in framework-res.apk and have the phone read it properly?
vibez said:
I've been playing around a little more today and it seems the issue is that no tool can rebuild the xml files correctly, they seem to be compressed/encoded.
Has anyone been able to edit an xml file in framework-res.apk and have the phone read it properly?
Click to expand...
Click to collapse
Refer to my signature. Apk manager.
Edit : just read ur op.
Never sign the system apk's. Simply keep the original signatures intact and after recompiling them, re-include them.
So here are the rules u must follow :
If u've modified the manifest.xml, u must stop core, push the apk, start core or push the apk while in recovery.
If u've modified anything else, a simple push / reboot will do the trick.
Note, u cannot flash a modified system apk the first time (as in on a clean boot), u must flash the original rom, let it build the dex's and then flash ur modified apk.
Daneshm90 said:
Refer to my signature. Apk manager.
Edit : just read ur op.
Never sign the system apk's. Simply keep the original signatures intact and after recompiling them, re-include them.
Click to expand...
Click to collapse
Hi, I am already using apk manager but the xml files it creates do not seem to work.
To prove this, I have done a test. See the attached xml files,
original_stat_sys_battery.xml was extracted from the original framework-res.apk
I then used apk manager to decompile and then recompile the same apk without making any changes.
recompiled_stat_sys_battery.xml is this recompiled file
I then opened up both files and they look different to me
vibez said:
Hi, I am already using apk manager but the xml files it creates do not seem to work.
To prove this, I have done a test. See the attached xml files,
original_stat_sys_battery.xml was extracted from the original framework-res.apk
I then used apk manager to decompile and then recompile the same apk without making any changes.
recompiled_stat_sys_battery.xml is this recompiled file
I then opened up both files and they look different to me
Click to expand...
Click to collapse
That shouldn't concern u. Apktool's method of rebuilding the apk/arsc file is slightly different than how android originally builds an apk. What should concern u is if the apk simply works. Now when u decompile the apk, can u check the log to see if it reports of any missing resources, if it doesn't ur fine. So decompile the apk, make ur changes, recompile the apk, move the original meta-inf folder into ur new apk and push it to ur phone following the guidelines in my previous post. if it causes problems, post ur log and i'll take a look.
Ok this time I have added meta-inf to the new apk, pushed it to my phone and the phone hangs on boot.
Here is my log
--------------------------------------------------------------------------
|08/08/2010 -- 18:36:30.87|
--------------------------------------------------------------------------
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the path specified.
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)
'adb' is not recognized as an internal or external command,
operable program or batch file.
Could Not Find C:\Documents and Settings\Lee\Desktop\Apk_Manager_4.8\place-apk-here-for-modding\../place-apk-here-for-modding/repackaged.apk
Could Not Find C:\Documents and Settings\Lee\Desktop\Apk_Manager_4.8\place-apk-here-for-modding\../place-apk-here-for-modding/repackaged-signed.apk
Could Not Find C:\Documents and Settings\Lee\Desktop\Apk_Manager_4.8\place-apk-here-for-modding\../place-apk-here-for-modding/repackaged-unsigned.apk
The system cannot find the file specified.
I: Loading resource table...
I: Decoding resources...
I: Copying assets and libs...
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'keyguard_password_attempts_count_pin_code' has no default translation in C:\Documents and Settings\Lee\Desktop\Apk_Manager_4.8\other\..\out\res; found: fr ko
I: Building apk file...
Click to expand...
Click to collapse
Oh lol i meant the log of ur phone.
Use adb logcat
lol ok, at which point should I run logcat - after the hang or as soon as I switch the phone on?
vibez said:
lol ok, at which point should I run logcat - after the hang or as soon as I switch the phone on?
Click to expand...
Click to collapse
When u switch phone On.
Ok here you are
vibez said:
Ok here you are
Click to expand...
Click to collapse
Heres ur culprit
Code:
java.lang.SecurityException: META-INF/MANIFEST.MF has invalid digest for AndroidManifest.xml
Now seems u modified the androidmanifest.xml ? If u didn't then heres my recommendation, copy over the original androidmanifest.xml from the original apk.

[Q] Adding Android AOSP keyboard to update.zip causes forced close.

I'm trying to add the Android AOSP keyboard to my update.zip and it keeps giving me forced close. It works fine when I install the apk manually. But once I place it in /system/app it will force close after flashing the update.zip via recovery.
Can someone please tell me how to fix this? I have tried several apk's and even build my own keyboard from the source found on android.git.kernel.org
Any help will be very much appreciated.
I'm having the same issue with some other apk's. They install fine on the phone from apk, but force close once added via /data/app or /system/app
The apk's that do it all have a lib folder inside, I tried putting those libs /system/lib but that didn't help.
I'm sure I'm missing something simple here but what?
I tried putting those libs /system/lib and /system/app but still FC
but I didn't use .odex, is it need?
mainicia said:
I tried putting those libs /system/lib and /system/app but still FC
but I didn't use .odex, is it need?
Click to expand...
Click to collapse
I used deodexed sources. Also I made it work by extracting the lib from the apk and placing it in /system/lib and leave the lib file inside the apk too. Removing it from the apk caused the force closes.

Categories

Resources