c# - Why can't MonoDroid find my assemblies? -


i made simple android helloworld app using xamarin studio 4.2.3 doesn't except prints out message if random number greater 0.5. works great on nexus 4 , nexus 5.

the next thing i'm doing extract .dll code app's apk (from assemblies folder) using 7zip. using .net reflector , reflexil i'm modifying single instruction, brfalse.s gets generated if statement in "if(rand.nextdouble()>0.5){dostuff()}" such branches instruction right in front of call dostuff(), thereby making if statement useless , ensuring method gets called.

next i'm saving patched .dll, replacing original 1 in .apk patched one, sign , zipalign .apk , i'm installing using adb.

when i'm launching app on phones crashes directly , logcat shows following:

03-20 10:12:08.709: i/activitymanager(764): start proc hellomonolvl.hellomonolvl activity hellomonolvl.hellomonolvl/hellomonolvl.hellomonolvl.trialsplashscreen: pid=23099 uid=10128 gids={50128}  03-20 10:12:08.729: d/dalvikvm(23099): trying load lib /data/app-lib/hellomonolvl.hellomonolvl-1/libmonodroid.so 0x427154a0 03-20 10:12:08.729: d/dalvikvm(23099): added shared lib /data/app-lib/hellomonolvl.hellomonolvl-1/libmonodroid.so 0x427154a0 03-20 10:12:08.739: w/libc(23099): warning: generic atexit() called legacy shared library  03-20 10:12:08.759: w/monodroid-gc(23099): gref gc threshold: 46800  03-20 10:12:08.769: a/monodroid-assembly(23099): coult not load assembly 'hellomonolvl' during startup registration.  03-20 10:12:08.769: a/monodroid-assembly(23099): might due invalid debug instalation.  03-20 10:12:08.769: a/monodroid-assembly(23099): common cause 'adb install' app directly instead of doing ide.  03-20 10:12:08.789: i/activitymanager(764): process hellomonolvl.hellomonolvl (pid 23099) has died.  03-20 10:12:08.789: w/activitymanager(764): force removing activityrecord{42752a50 u0 hellomonolvl.hellomonolvl/hellomonolvl.hellomonolvl.trialsplashscreen t238}: app died, no saved state 

since didn't work used c# port of lvl. built lvl sample app, deployed , works on phones. again extracted .dll license verification code, using reflexil changed code of method, injected patched .dll in apk, signed , zipaligned apk. again doesn't work crashes on launch , get:

03-20 10:21:19.049: d/dalvikvm(23507): trying load lib /data/app-lib/de.marius.lvl-1/libmonodroid.so 0x42711448  03-20 10:21:19.049: d/dalvikvm(23507): added shared lib /data/app-lib/de.marius.lvl-1/libmonodroid.so 0x42711448  03-20 10:21:19.069: a/monodroid(23507): no assemblies found in '/data/data/de.marius.lvl/files/.__override__' or '/storage/emulated/0/android/data/de.marius.lvl/files/.__override__'. assuming part of fast deployment. exiting...  03-20 10:21:19.079: i/activitymanager(764): process de.marius.lvl (pid 23507) has died.  03-20 10:21:19.079: w/activitymanager(764): force removing activityrecord{42bc3c60 u0 de.marius.lvl/.trialsplashscreen t239}: app died, no saved state 

it doesn't seem make difference if i'm using apk xamarin generates in release mode or debug mode. tried both using apk versions bin folder of project , ones pulled phone adb pull.

i'm new xamarin maybe approach naive. there hash check patched .dlls don't pass? saw reflexil has option remove strongnames, tried didn't seem make difference (but must admit don't know how work).

is possible i'm trying do? appreciate.

uninstall packages installed in project including android support libraries android.support.v4 support libraries , clean solution.

then again reinstall required packages , support libraries , rebuild solution. may sort out query.


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -