- if [ $tool = am -o $tool = pm ]; then
- # These tools require having /system/bin/app_process in the PATH,
- # at least on a Nexus 6p running Android 6.0.
- echo -n 'PATH=$PATH:/system/bin ' >> $WRAPPER_FILE
+
+ # Some of these tools (am,dalvikvm,?) requires LD_LIBRARY_PATH setup on at least some devices:
+ if [ $tool != getprop ]; then
+ echo 'if [ -n "`getprop ro.product.cpu.abilist64`" ]; then BITS=64; else BITS=; fi' >> $WRAPPER_FILE
+ echo -n 'LD_LIBRARY_PATH=/system/lib$BITS ' >> $WRAPPER_FILE