如何将库添加到 Android 模拟器的 lib 文件夹
我有 libTestLibrary.so 库,我想将其添加到 Android 模拟器的 lib 文件夹中。我该怎么做?
我执行以下步骤:
- 窗口 / 打开透视图 / 其他... / DDMS
- 输入文件资源管理器 选项卡。
- 找到lib文件夹并打开它。
- 按将文件推送到设备并选择我想要推送到设备的库,但随后进程开始,几秒钟后终止并出现错误:
[2011-05-19 12:26:34] 无法推送选择:只读文件系统
额外。亲爱的埃里克:
我看到您链接的帖子,但我无法理解它,您能为我的问题提供以下代码示例或解释一下吗?
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
额外。
我在命令行中写入:
C:\android\android-sdk-windows\platform-tools>adb remount
C:\android\android-sdk-windows\platform-tools>adb push libDsmShared.so /system/lib/libDsmShared.so
并出现错误:
无法将“libDsmShared.so”复制到 '/system/lib/libDsmShared.so':超出 内存
已添加
我已执行以下步骤:
- 启动 Eclipse
- 转到:窗口 ->开放视角->其他...
- 从打开的对话框中选择DDMS
- 选择“文件资源管理器”选项卡。
- 按“将文件推送到设备上”并选择我要推送的库。 <块引用>
无法推送选择:只读文件系统
- 最小化所有打开的窗口并打开命令行
- 写入:cd C:\android\android-sdk-windows\platform-tools输入
写入:abd remount输入
<块引用>你会看到重新挂载成功
最大化 Eclipse 并尝试步骤 5。
<块引用>推送选择失败:内存不足
最大化Eclipse
错误。
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:
- Window / Open Perspective / Other... / DDMS
- Enter File Explorer tab.
- Find lib folder and open it.
- 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:
- Launch Eclipse
- Go To: Window -> Open Perspective -> Other ...
- Select DDMS from the opened dialog
- Select "File explorer" tab.
- Press "Push a file onto the device" and select library which I wish to push.
Failed to push selection: Read-only file system
- Minimize all opened windows and open Command Line
- Write: cd C:\android\android-sdk-windows\platform-tools enter
Write: abd remount enter
You will see remount successful
Maximize Eclipse and try step 5.
Failed to push selection: Out of memory
Error appears.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如何将库添加到 Android-Emulator 的 lib 文件夹
操作系统:Windows 7、Eclipse
这里我介绍如何将库添加到 Android-Emulator 的 lib 文件夹中,这需要我一周的时间,但我已经完成了所有操作并想分享我的结果,以便您可以快速有效地解决您的问题。因此,我将介绍如何完成此操作的步骤:
打开 Eclipse。
打开命令行 (cmd) 并转到 Android SDK 所在的路径:
<块引用>
cd C:\android\android-sdk-windows\tools
现在我们将以给定的分区大小运行模拟器,输入以下命令:
<块引用>
C:..\工具>模拟器 -avd EmulatorName -partition-size 512
注意: EmulatorName - 是您的模拟器的名称。
等待模拟器启动并最小化命令行(不要关闭它),打开新的命令行(cmd)并转到路径:
<块引用>
cd C:\android\android-sdk-windows\platform-tools
运行命令
<块引用>
C:..\平台工具> adb 重新挂载
转到 Eclipse 并打开
<块引用>
窗口 ->开放视角->其他...
在打开的对话框中选择 DDMS。
选择“文件资源管理器”选项卡。
选择目录\system\lib
选择“将文件推送到设备”并选择您想要的库。
全部完成!
有用的链接:
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:
Open Eclipse.
Open Command Line (cmd) and go to path there your android SDK located:
Now we will run Emulator with given partition size, enter following command:
Wait until emulator starts and minimize Command Line ( don't close it ), open new Command Line (cmd) and go to path:
Run the command
Go to Eclipse and open
Select DDMS in the opened Dialog.
Select "File Explorer" tab.
Select directory \system\lib
Select "Push a file onto Device" and select library(s) witch you want.
All Done !
Useful links:
对于 Linux,我尝试了以下步骤并且成功了:
i) 使用命令“adb shell”
ii) 遍历到“/system/xbin”
iii) 使用“ls”命令定位“su”
iV) 使用“su”命令
V) 使用“chmod 777 /system/lib”更改权限
In case of linux, I tried the following steps and it worked:
i) Use command 'adb shell'
ii) traverse to '/system/xbin'
iii) use 'ls' command to locate 'su'
iV) use 'su' command
V) Change permissions using 'chmod 777 /system/lib'