Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I add library to Android-Emulator's lib folder

I have libTestLibrary.so library and I want add it to Android-emulator's lib folder. How can I do this ?

I make following steps:

  1. Window / Open Perspective / Other... / DDMS
  2. Enter File Explorer tab.
  3. Find lib folder and open it.
  4. Press Push a file onto device and select library which I want to push to device, but then process starts and after some seconds it's terminated and error appears:
[2011-05-19 12:26:34] Failed to push selection: Read-only file system

Added. Dear Eric:

I see the post that you linked but I can't understand it, can you give example of following code for my problem or explain this ?

adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock03 /system
adb push su /system/xbin/su
adb shell chmod 06755 /system
adb shell chmod 06755 /system/xbin/su
adb install superuser.apk

Added.

I have write in command line:

C:\android\android-sdk-windows\platform-tools>adb remount 
C:\android\android-sdk-windows\platform-tools>adb push libDsmShared.so /system/lib/libDsmShared.so

and error appears:

failed to copy 'libDsmShared.so' to '/system/lib/libDsmShared.so': Out of memory

Added

I have made the following steps:

  1. Launch Eclipse
  2. Go To: Window -> Open Perspective -> Other ...
  3. Select DDMS from the opened dialog
  4. Select "File explorer" tab.
  5. Press "Push a file onto the device" and select library which I wish to push.

    Failed to push selection: Read-only file system

  6. Minimize all opened windows and open Command Line
  7. Write: cd C:\android\android-sdk-windows\platform-tools enter
  8. Write: abd remount enter

    You will see remount successful

  9. Maximize Eclipse and try step 5.

    Failed to push selection: Out of memory

Error appears.

like image 411
Viktor Apoyan Avatar asked May 19 '11 06:05

Viktor Apoyan


1 Answers

How can I add library to Android-Emulator's lib folder

Operation System: Windows 7, Eclipse

Here I present the steps how I add libraries to Android-Emulator's lib folder, it takes a week from me, but I have done all and want to share my results in order you can solve your problem very fast and effectively. So I will present steps how I done this:

  1. Open Eclipse.

  2. Open Command Line (cmd) and go to path there your android SDK located:

    cd C:\android\android-sdk-windows\tools

  3. Now we will run Emulator with given partition size, enter following command:

    C:..\tools> emulator -avd EmulatorName -partition-size 512

    NOTE: EmulatorName - is the name of your emulator.

  4. Wait until emulator starts and minimize Command Line ( don't close it ), open new Command Line (cmd) and go to path:

    cd C:\android\android-sdk-windows\platform-tools

  5. Run the command

    C:..\platform-tools> adb remount

  6. Go to Eclipse and open

    Window -> Open Perspective -> Other ...

  7. Select DDMS in the opened Dialog.

  8. Select "File Explorer" tab.

  9. Select directory \system\lib

  10. Select "Push a file onto Device" and select library(s) witch you want.

All Done !

Useful links:

  • Run android emulator from command prompt
  • Stackoverflow Android Questions
like image 98
Viktor Apoyan Avatar answered Oct 16 '22 17:10

Viktor Apoyan