Talk:Emulator
From nookDevs
Perhaps it would be possible to post an entire, modified image for easier usage? Scrambling all the tools together takes a while - plus, the first two tries were hit'n'miss for me. --Promethe 03:57, 5 January 2010 (PST)
As I understand it that would involve posting information that we don't have the right to redistribute. i.e. it would include some B&N controlled items. And I think we are trying to avoid getting into hot water with them. -- grayeul 08:19, 5 January 2010 (CST)
That makes a lot of sense, I do agree. This is why I wonder whether we can also post the original, untouched update files. They are to be downloaded by the device and are hidden for purpose. --Promethe 07:15, 5 January 2010 (PST)
I was having trouble with the terminal input : tail -c+
Example: tail -c+152 /path/to/firmware > signed_bravo_update.1.0.0.tar.gz
how is the mkyaffs2image command supposed to look? I think my trouble lies there. when i launch the emulator it hangs on the black screen. Also what directory do you want to be in when inputting the launch emulator command?--Skierdb526 11:15, 6 January 2010 (PST)
I think this is the correct setup: mkyaffs2image 0 system_directory output.img
I get a little lost around steps 13 & 14...unless this was edited recently and something left out, it looks like you are taking a file from the Andriod SDK system image, and then putting it right back without any changes?
•grab lib/libaudioflinger.so from stock system.img supplied with Android SDK using unix utility unyaffs to extract the file
•use mkyaffs2image to make a system.img after you overwrite libaudioflinger.so in the /lib directory.
I don't see where you are making any changes to the libaudioflinger.so file? --Dbrade 18:58, 21 January 2010 (PST)
Read more: https://nookdevs.com/Emulator#ixzz0dJ1rzisl
That is correct. You are not changing the libaudioflinger.so file. Instead you are putting the standard one that you use with the emulator, into the image that you have for the nook. Without this, the .so from the nook device will be used with the emulator and it will fail due to device specific differences. -- grayeul 12:31 22 Jan 2010 (CST)
OS X 10.5
I was unable to build mkyaffs2image on OS X 10.5 (tiger)
TheWoollybullys-Macbook:~ TheWoollybully$ cd Downloads/android/nook/mkyaff2image/virtualMIPS/yaffs2/utils/ TheWoollybullys-Macbook:utils TheWoollybully$ make gcc -c -I../../../include -I.. -O2 -Wall -DCONFIG_YAFFS_UTIL -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline mkyaffs2image.c -o mkyaffs2image.o In file included from mkyaffs2image.c:59: ../yaffs_guts.h:823: error: syntax error before ‘loff_t’ ../yaffs_guts.h:824: warning: function declaration isn’t a prototype ../yaffs_guts.h:825: error: syntax error before ‘loff_t’ ../yaffs_guts.h:826: warning: function declaration isn’t a prototype ../yaffs_guts.h:827: error: syntax error before ‘loff_t’ ../yaffs_guts.h:827: warning: function declaration isn’t a prototype mkyaffs2image.c:240: warning: no previous prototype for ‘nandmtd2_pt2buf’ mkyaffs2image.c:604: warning: no previous prototype for ‘usage’ make: *** [mkyaffs2image.o] Error 1 TheWoollybullys-Macbook:utils TheWoollybully$
-- TheWoollyBully 19:25 9 Feb 2010 (PST)
Unfortunately, mkyaffs is closely tied to linux. If you don't have a linux machine handy, download VirtualBox (free from Sun) and install ubuntu in a virtual machine there. Mr x 11:01, 16 February 2010 (PST)
Contents |
emulating softrooted 1.2 image
Is it possible to emulate nook using softrooted 1.2 image rather than vanilla 1.0.0 image? --Spec 10:19, 14 February 2010 (PST)
Yes. the steps are almost same as 1.0, but with the 1.2 image.
differences - 1. In ServerThread.smali, the line number will be different. Look for -lt in the file instead. It will be in only 1 place.
2. To enable app upgrades from eclipse/ant, you have to replace the PackageManager.smali with the one from 1.0 image.
-
- I thought i did step 1 - I removed the line beginning with "if-lt v0, v1, :cond_". Emulator didn't want to boot with that image. Did you actually try that? --Spec 14:48, 14 February 2010 (PST)
Yes. I have it working. Others have done it as well. Make sure your AVD doesn't have any attributes like lcd, sdcard etc defined. I had those in my 1.0 version and it was working. But in 1.2, I had to create a new AVD with none of those.
See if you can at least connect using adb shell and do logcat. That might help narrow down the problem.
-
- I repeated the instructions again on the 1.2 softrooted image and it worked this time. The line number in ServerThread.smali for 1.2 image is 765 ("if-lt v0, v1, :cond_309") (if anyone needs it). Thanks --Spec 17:52, 16 February 2010 (PST)
Nook Emulator Skin
Is it possible to make a skin for the android emulator? --TheWoollyBully 19:53, 15 February 2010 (PST)
I've followed the instructions for the 1.0.0 image, but I seem to have broken services.jar somehow (based on the error message)...
The commands I used to produce the new system.img were:
10328 mkdir nook_firmware_1.0.0 10329 cd nook_firmware_1.0.0 10330 tar xvfz ../signed_bravo_update.1.0.0.tgz 10331 mv Firmware_Update/bravo_update.dat . 10332 rm -rf Firmware_Update 10333 tar xvfz bravo_update.dat 10334 mv Firmware_Update/* . 10335 rm bravo_update.dat 10336 tar xvfzp root.tgz 10337 cd system/framework 10338 unzip services.jar 10340 rm -rf META-INF 10341 ~/bin/baksmali classes.dex 10342 vi out/com/android/server/ServerThread.smali 10343 ~/bin/smali out/ 10344 mv out.dex classes.dex 10347 zip services.jar classes.dex 10348 rm -rf classes.dex out 10359 cd ~/android-sdk-linux_86/platforms/android-1.5/ 10360 cd images 10362 mkdir system-sdk 10363 cd system-sdk 10364 ~/bin/unyaffs ../system.img 10369 cp -r ~/nook_firmware_1.0.0/system system 10370 cp system-sdk/lib/libaudioflinger.so system/lib/libaudioflinger.so 10373 ~/bin/mkyaffs2image 0 system/ system.img 10374 cd .. 10375 cd .. 10376 tools/emulator @nook -shell -show-kernel -verbose
When the emulator runs, the linux kernel boots off of initramfs fine, and gets up to the point where it mounts the nand filesystem where it prints out the following:
yaffs: dev is 32505856 name is "mtdblock0" yaffs: passed flags "" yaffs: Attempting MTD mount on 31.0, "mtdblock0" yaffs_read_super: isCheckpointed 0 save exit: isCheckpointed 0 yaffs: dev is 32505857 name is "mtdblock1" yaffs: passed flags "" yaffs: Attempting MTD mount on 31.1, "mtdblock1" yaffs_read_super: isCheckpointed 0 yaffs: dev is 32505858 name is "mtdblock2" yaffs: passed flags "" yaffs: Attempting MTD mount on 31.2, "mtdblock2" yaffs_read_super: isCheckpointed 0 # init: cannot find '/system/bin/playmp3', disabling 'bootsound' init: untracked pid 545 exited init: untracked pid 546 exited eth0: link up warning: `rild' uses 32-bit capabilities (legacy support in use) init: untracked pid 555 exited init: untracked pid 566 exited init: untracked pid 563 exited init: untracked pid 568 exited init: untracked pid 573 exited init: untracked pid 570 exited init: untracked pid 575 exited init: untracked pid 580 exited init: untracked pid 577 exited init: critical process 'servicemanager' exited 4 times in 4 minutes; rebooting into recovery mode save exit: isCheckpointed 1 save exit: isCheckpointed 1 Restarting system with command 'recovery'. Reboot failed -- System halted
Could anyone who has built the image successfully help? I will try using the 1.2 update too next time I play with this...
-- Mr x 11:37, 16 February 2010 (PST)
-
- I'm not sure if you're supposed to delete META-INF directory? --Spec 17:17, 16 February 2010 (PST)
- It seems to be an issue of emulator on 64-bit Linux. I've tried to run emulator on 3 machines (32 bit Lucid, 64 bit Lucid, 64 bit Hardy) but was succeeded only on 32-bit Lucid. -- Ired 11:30, 22 May 2010 (PST)
Can't use my mouse to click on anything
I could follow the tutorial to create a virtual machine for softrooted v1.3. The emulator starts up, but I couldn't use my mouse to click on anything, so basically I'm stuck with the register screen. Anyone has any ideas why it's the case? --Wasabi 03:57, 20 June 2010 (PDT)
First time user
This is my first time trying to use an SDK. I am using windows and don't know how to run anything\do the commands. I tried cmd, but it does not work. Is it possible to have much more detailed instructions please, thank you. -- Julienrl
Under Creative Commons License: Attribution Non-Commercial Share Alike
Copy of Softrooted Emulator image
Given that we already host the softrooted images, could we host a softrooted emulator image? I don't see why this would put us "in the bad" with Barnes and Noble. I'm currently in the process of converting the 1.4 image for the emulator, and would be more than willing to upload it for others. --Zastrowm 13:43, 3 July 2010 (PDT)
What do the admins think? Would hosting the rooted emulated image be alright? Like I said before, I have the 1.4 softrooted image and would be glad to upload it if the admins feel it would be alright. --Zastrowm 00:32, 9 July 2010 (PDT)
Would you mind uploading the rooted emulator image to some file hoster? I'd gladly save myself a bunch of work and try it out rather than build it myself. If you do upload it somewhere, please send me the link via PM to "curio" in the MobileRead forums if you don't want to publish it here. --Curio 00:28, 15 July 2010 (PDT)
- Well, admins didn't say anything, and I got a couple requests, so I uploaded it to Google Docs. Compressed System.img can be found . You'd start with step 18 of the instructions here on the site. I'd rather have it hosted somewhere else, if anyone has any ideas. --Zastrowm 02:06, 16 July 2010 (PDT)
-
- It works -- great, thanks! :-) --Marco (Curio 02:27, 16 July 2010 (PDT))
-
- Sound works good, thanks! --Jonny 10:23, 19 July 2010 (PDT)
-
- You could host it on megaupload.com or something to that extent
-
- I got it loaded! Thanks a lot for that! I tried running the emulator with an SD card though and the sdcard did not show up. Did I miss something, or is there a trick to get that to work? I was mainly interested to see if the audio player woudl work in the emulator but could not think of a way to get some mp3 files on the emulated device other than on an SD iso. Also, it said downloading was not supported when I went to download a test mp3. --Jonny 10:23, 17 July 2010 (PDT)
-
-
- Yeah, I currently have the same problem. I'm gonna try rebuilding it to make sure I didn't mess anything up. I'll keep everyone updated on it. --Zastrowm 00:39, 18 July 2010 (PDT)
-
-
-
-
- Well, I redid it, same problems. I'm assuming everyone else has the same problems, but it would be nice if others chimed in on whether or not their images did the same. I also posted instructions on the Emulator page for downloading a script to automate the process of creating the image; My blog post looks better and is easier on the eyes if you want to follow them. I'll update when 1.5 comes out of course. I'll also be taking down the image after a while just because its so simple to create your own now.--Zastrowm 01:16, 22 July 2010 (PDT)
-
-
Real screen size
Here is a hint to make emulator showing full-size screen (600x944 px). After creating AVD (name it 'nook', for example), just edit ~/.android/avd/nook.avd/config.ini to change
skin.path=600x944
skin.name=600x944
After that you can run emulator with full-size screen:
$ emulator
p.s. tested on BSDroid
- FWIW, config.ini is just where the values you entered in the Android Virtual Device wizard are stored, so editing the file by hand doesn't make a difference. Also, this doesn't work on the current Linux emulator:
allocating frame buffer 600 * 944, got 00000000 goldfish_fb: probe of goldfish_fb.0 failed with error -12
- The framebuffer emulator apparently has a maximum of around 508000 pixels -- 538x944 is the highest resolution that will work currently. Neilk 07:14, 9 November 2010 (PST)