Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Sony Reader > Sony Reader Dev Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 02-25-2012, 09:24 AM   #46
j0534ng31
Connoisseur
j0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheese
 
Posts: 83
Karma: 1224
Join Date: Dec 2011
Location: Gijon (Spain)
Device: Sony PRS-T1 black
Quote:
Originally Posted by xuyn2003 View Post
Finally I found that when "install-recovery.sh" is running, the sdcard had not been mounted yet. Because install-recovery.sh can mkdir in /data but can't mkdir in /mnt/sdcard,
then the question is, how to mount the sdcard in install-recovery.sh?

Thanks uboot.
This is not very difficult...

I did it adding this just before the mount command:
Code:
if ! ( grep -c "/mnt/sdcard" /proc/mounts ); then
   sleep 10
   if ! ( grep -c "/mnt/sdcard" /proc/mounts ); then
      sleep 10
      if ! ( grep -c "/mnt/sdcard" /proc/mounts ); then
         sleep 10
      fi
   fi
fi
j0534ng31 is offline   Reply With Quote
Old 02-26-2012, 03:30 AM   #47
xuyn2003
Connoisseur
xuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texan
 
Posts: 71
Karma: 18140
Join Date: Jul 2011
Device: PRS-T1&KOBOTOUCH
Quote:
Originally Posted by j0534ng31 View Post
This is not very difficult...

I did it adding this just before the mount command:
Code:
if ! ( grep -c "/mnt/sdcard" /proc/mounts ); then
   sleep 10
   if ! ( grep -c "/mnt/sdcard" /proc/mounts ); then
      sleep 10
      if ! ( grep -c "/mnt/sdcard" /proc/mounts ); then
         sleep 10
      fi
   fi
fi
Thanks j0534ng31, it worked!

But as I tested in terminal, the script will always sleep 30 seconds.
That is, ( grep -c "/mnt/sdcard" /proc/mounts ) is always return FALSE.

Or a trigger can be implmented? Once the /mnt/sdcard was mounted, the command will be excuted.

And, before /mnt/sdcard/ was mounted, the system had already loaded some fonts from /ebook/fonts, such as DroidSans.ttf. I want the system load all fonts from /sdcard/fonts, so it's better to mount /mnt/sdcard/ at first directly, then bind /sdcard/fonts to /ebook/fonts as soon as possible. Not to wait the system to mount the sdcard.

Last edited by xuyn2003; 02-26-2012 at 04:46 AM.
xuyn2003 is offline   Reply With Quote
Old 02-26-2012, 09:36 AM   #48
j0534ng31
Connoisseur
j0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheese
 
Posts: 83
Karma: 1224
Join Date: Dec 2011
Location: Gijon (Spain)
Device: Sony PRS-T1 black
Quote:
Originally Posted by xuyn2003 View Post
But as I tested in terminal, the script will always sleep 30 seconds.
That is, ( grep -c "/mnt/sdcard" /proc/mounts ) is always return FALSE.
I suppose that it returns always FALSE if you don´t have busybox correctly installed, as you don't have a 'grep' command... try 'busybox grep' instead...


Quote:
Originally Posted by xuyn2003 View Post
And, before /mnt/sdcard/ was mounted, the system had already loaded some fonts from /ebook/fonts, such as DroidSans.ttf.
It's very possible you are right


Quote:
Originally Posted by xuyn2003 View Post
I want the system load all fonts from /sdcard/fonts, so it's better to mount /mnt/sdcard/ at first directly, then bind /sdcard/fonts to /ebook/fonts as soon as possible. Not to wait the system to mount the sdcard.
Again, I suppose this can only be solved by using one of the other approachs: to edit the boot image (very dangerous) or to edit the fonts cramfs image (very easy) and replace the system fonts.
j0534ng31 is offline   Reply With Quote
Old 02-26-2012, 11:19 PM   #49
xuyn2003
Connoisseur
xuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texan
 
Posts: 71
Karma: 18140
Join Date: Jul 2011
Device: PRS-T1&KOBOTOUCH
Quote:
Originally Posted by j0534ng31 View Post
I suppose that it returns always FALSE if you don´t have busybox correctly installed, as you don't have a 'grep' command... try 'busybox grep' instead...



It's very possible you are right



Again, I suppose this can only be solved by using one of the other approachs: to edit the boot image (very dangerous) or to edit the fonts cramfs image (very easy) and replace the system fonts.
Thanks for your reply!

Because my font is very big, 12MB, so I can't made a cramfs image which is smaller than the original image.

Later, I put one font in /data, can be binded successfuly before the system loading fonts, because /data has already been mounted when the install-recovery.sh is running.
The weakness of putting fonts in /data is occupied much space of /data.

I just don't know how to mount /mnt/sdcard mannualy in recovery.sh.
mount -t vfat /dev/block//vold/179:1 /mnt/sdcard?
I can successfuly excute this command in terminal emulator, mounted to a temp directory /tt,
but after I put it in install-recovery.sh, after reboot, mount was failed.

Last edited by xuyn2003; 02-26-2012 at 11:26 PM.
xuyn2003 is offline   Reply With Quote
Old 02-27-2012, 06:16 AM   #50
uboot
Evangelist
uboot seems famous, but is in fact legendary.uboot seems famous, but is in fact legendary.uboot seems famous, but is in fact legendary.uboot seems famous, but is in fact legendary.uboot seems famous, but is in fact legendary.uboot seems famous, but is in fact legendary.uboot seems famous, but is in fact legendary.uboot seems famous, but is in fact legendary.uboot seems famous, but is in fact legendary.uboot seems famous, but is in fact legendary.uboot seems famous, but is in fact legendary.
 
Posts: 425
Karma: 75216
Join Date: Nov 2011
Location: old europe
Device: Kobo Mini, Tolino Epos 2
What about mount /dev/block/mmcblk2p4 /mnt/sdcard ?
uboot is offline   Reply With Quote
Old 02-27-2012, 02:06 PM   #51
j0534ng31
Connoisseur
j0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheese
 
Posts: 83
Karma: 1224
Join Date: Dec 2011
Location: Gijon (Spain)
Device: Sony PRS-T1 black
Quote:
Originally Posted by xuyn2003 View Post
I just don't know how to mount /mnt/sdcard mannualy in recovery.sh.
mount -t vfat /dev/block//vold/179:1 /mnt/sdcard?
If you want do it the same way as the system (by using vold), you have to:

To know the volumes mounted:
Code:
vdc volume list

To umount the internal memory (SD card):
Code:
vdc volume unmount sdcard
To umount the external Micro-SD card:
Code:
vdc volume unmount extsd

To mount the internal memory (SD card):
Code:
vdc volume mount sdcard
To mount the external Micro-SD card:
Code:
vdc volume mount extsd
j0534ng31 is offline   Reply With Quote
Old 02-28-2012, 07:20 AM   #52
xuyn2003
Connoisseur
xuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texan
 
Posts: 71
Karma: 18140
Join Date: Jul 2011
Device: PRS-T1&KOBOTOUCH
Thank you j0534ng31, for the command string.
I can vdc volume mount sdcard in terminal, howerver failed in install-recovery.sh.
xuyn2003 is offline   Reply With Quote
Old 02-28-2012, 07:29 AM   #53
xuyn2003
Connoisseur
xuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texan
 
Posts: 71
Karma: 18140
Join Date: Jul 2011
Device: PRS-T1&KOBOTOUCH
Quote:
Originally Posted by uboot View Post
What about mount /dev/block/mmcblk2p4 /mnt/sdcard ?
Oh, hey! That's it, got success!

The remainning problem is that the file names are some different from the orignial sdcard, so some APKs can't read their datas from sdcard.
I think that is because I missed some parameters in the mount command.

I recorded the out put of "cat /proc/mounts" of orginal mounting as below, how can we add those parameters to the mount command? which should be after "-o", which should be after "-t"?

/dev/block//vold/179:68 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,noatime,uid=1000,gi d=1015,fmask=0002,dmask=0002,allow_utime=0020,code page=cp437,iocharset=iso8859-1,shortname=mixed,batch_sync,uft8,errors=remount-ro 00

Last edited by xuyn2003; 02-28-2012 at 07:33 AM.
xuyn2003 is offline   Reply With Quote
Old 02-28-2012, 10:21 AM   #54
j0534ng31
Connoisseur
j0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheese
 
Posts: 83
Karma: 1224
Join Date: Dec 2011
Location: Gijon (Spain)
Device: Sony PRS-T1 black
Quote:
Originally Posted by xuyn2003 View Post
The remainning problem is that the file names are some different from the orignial sdcard, so some APKs can't read their datas from sdcard.
I think that is because I missed some parameters in the mount command.
Instead of the above instructions, use:

Code:
vdc volume mount /mnt/sdcard
j0534ng31 is offline   Reply With Quote
Old 03-01-2012, 08:42 AM   #55
xuyn2003
Connoisseur
xuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texan
 
Posts: 71
Karma: 18140
Join Date: Jul 2011
Device: PRS-T1&KOBOTOUCH
Finally worked it out, thanks for uboot and j0534ng31's help.
Now I can replace any fonts of /ebook, including the system UI fonts.


Code:
#!/system/bin/sh

mkdir /data/altsd

mount -o noatime,utf8 -t vfat /dev/block/mmcblk2p4 /data/altsd

afd=/data/altsd/altfonts/
fts=`ls $afd`
for ft in $fts
 do
  mount -o bind $afd$ft /ebook/fonts/$ft
done
Why not mount to /mnt/sdcard directly? Because if mounted to /mnt/sdcard, sometime later, when the system do the mount procedure, will got faliure because /mnt/sdcard was already occupied, and some related action will not be done. To avoid this, I mount to another directory.

As to VDC, I guess that it has not been initialized when the install-recovey.sh is running.

Last edited by xuyn2003; 03-01-2012 at 08:49 AM.
xuyn2003 is offline   Reply With Quote
Old 03-01-2012, 04:19 PM   #56
snarkophilus
Wannabe Connoisseur
snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.
 
Posts: 425
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
Quote:
Originally Posted by xuyn2003 View Post
Now I can replace any fonts of /ebook, including the system UI fonts.

Code:
#!/system/bin/sh

mkdir /data/altsd

mount -o noatime,utf8 -t vfat /dev/block/mmcblk2p4 /data/altsd

afd=/data/altsd/altfonts/
fts=`ls $afd`
for ft in $fts
 do
  mount -o bind $afd$ft /ebook/fonts/$ft
done
One query - do you need to deal with the possibility of font files with spaces in the names? You might need to do something like:

Code:
afd=/data/altsd/altfonts/
fts=$(cd $afd; echo "*")
for ft in $fts; do
  mount -o bind $afd"$ft" /ebook/fonts/"$ft"
done
or

Code:
afd=/data/altsd/altfonts/
ls -1 $afd | while read ft; do
  mount -o bind $afd"$ft" /ebook/fonts/"$ft"
done
where the " marks are important.

Cheers,
Simon.
snarkophilus is offline   Reply With Quote
Old 03-01-2012, 09:09 PM   #57
xuyn2003
Connoisseur
xuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texanxuyn2003 might easily be mistaken for a Texan
 
Posts: 71
Karma: 18140
Join Date: Jul 2011
Device: PRS-T1&KOBOTOUCH
Quote:
Originally Posted by snarkophilus View Post
One query - do you need to deal with the possibility of font files with spaces in the names?
Hi Simon, thank you for the reminder.
But only those fonts whose filenames are equals to the filenames in /ebook/fonts will be binded, and I didn't found any filename in /ebook/fonts contains space characters.
xuyn2003 is offline   Reply With Quote
Old 03-07-2012, 03:45 AM   #58
rinring
Junior Member
rinring began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jan 2012
Device: Sony PRS-T1
Hi,

Even though I have installed the enable-adb package (or think I've been able to do that), and I have edited the ~/.android/adb_usb.ini file with these contents:

0x054C

I cannot connect with ADB under Linux. :-(
I have also activated the Debugging USB.

When I connect the cable, I see the Android icon in the upper left corner of the reader.

lsusb correctly detects the Sony Reader:
Quote:
Bus 001 Device 005: ID 054c:05c2 Sony Corp.
But adb doesn't: :-(

Quote:
adb devices
List of devices attached
Any hint please?
rinring is offline   Reply With Quote
Old 03-07-2012, 04:08 AM   #59
Xaphiosis
Connoisseur
Xaphiosis doesn't litterXaphiosis doesn't litterXaphiosis doesn't litter
 
Posts: 52
Karma: 216
Join Date: Apr 2010
Device: PRS-T1
I just got the device today and have successfully updated the firmware, applied the root package and then the enable-adb package. I added "0x054C" to ~/.android/adb_usb.ini ... but exactly like rinring, adb devices does not pick up my T1; lsusb shows it fine. Android tools freshly updated, latest firmware installed on T1.

There is a little android dude icon, it says "usb debugging connected", everything looks to be OK, it just doesn't work. Any advice? I'd like to repartition so I can play around with apps
Xaphiosis is offline   Reply With Quote
Old 03-07-2012, 05:19 AM   #60
j0534ng31
Connoisseur
j0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheese
 
Posts: 83
Karma: 1224
Join Date: Dec 2011
Location: Gijon (Spain)
Device: Sony PRS-T1 black
Quote:
Originally Posted by Xaphiosis View Post
There is a little android dude icon, it says "usb debugging connected", everything looks to be OK, it just doesn't work. Any advice? I'd like to repartition so I can play around with apps
For an unknown (to me) reason, it never works... Seems to be a little bug.

You have to:
- Go to the "little android dude icon"
- Disable "usb debug"
- Enable it again
- It show a new window: Press "accept" o "ok"
- And, now, adb works

You have to do the same procedure every time the USB wire has been disconnected.

However, if you order to reboot from adb or from the T1 device, there is no need to do that. It gets ready instantly, just after the reboot process.

Last edited by j0534ng31; 03-07-2012 at 05:44 AM.
j0534ng31 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
friend needs some help with adb emusan enTourage Archive 2 05-27-2011 01:00 PM
Curiosity ? What is ADB and why do I need it? Sethman Nook Developer's Corner 3 02-05-2011 03:44 PM
adb is not recognized jyl Nook Developer's Corner 3 01-18-2011 09:49 AM
Help with adb Thibor Nook Developer's Corner 5 12-05-2010 07:22 AM
Classic Using Adb rdfry Barnes & Noble NOOK 5 02-27-2010 08:19 PM


All times are GMT -4. The time now is 04:08 PM.


MobileRead.com is a privately owned, operated and funded community.