Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 02-21-2012, 09:06 PM   #16
idoit
Plus
idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.
 
idoit's Avatar
 
Posts: 365
Karma: 262144
Join Date: Jan 2012
Location: Tehran, Iran - Halifax, Canada
Device: iPhone 5s
5. Purge cache memory:
This very simple lovely extension purges cache memory... it means more free memory and less resources taken, which in my opinion is very important for such embedded systems. Yes I know, Linux is pretty damn good at memory management but still...

Requirements:
GUI Launcher

Install:
extract the attached file in extension folder.

Test:
First run
Code:
free -m
in SSH. Then run this simple script via GUI Launcher and run free -m again to see the difference in memory usage and free memory.
Attached Files
File Type: gz purge-mem.tar.gz (663 Bytes, 70 views)

Last edited by idoit; 02-21-2012 at 09:12 PM.
idoit is offline   Reply With Quote
Old 02-21-2012, 11:36 PM   #17
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,441
Karma: 5840130
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by cscat View Post
5. Purge cache memory:
This very simple lovely extension purges cache memory... it means more free memory and less resources taken, which in my opinion is very important for such embedded systems. Yes I know, Linux is pretty damn good at memory management but still...

Requirements:
GUI Launcher

Install:
extract the attached file in extension folder.

Test:
First run
Code:
free -m
in SSH. Then run this simple script via GUI Launcher and run free -m again to see the difference in memory usage and free memory.
A couple of notes:

That script presumes it is being run by the user 'root' - only 'root' has write permission on /proc/sys/vm/drop_caches

The 'sync' is not required, dropping caches causes the dirty cache entries to be written, even if the underlying file system does not support 'sync' (like FAT-32).

There is no need to pipe the output of echo through tee.
Code:
echo 3 >/proc/sys/vm/drop_caches
does the same thing, without executing another process (which would just dirty some of the just cleared VFS buffers).
And since it is now down to a single line of code, why not just assign a shell alias to that operation in /etc/profile? Your choice of alias name, but would look like:
Code:
alias dc="echo 3 >/proc/sys/vm/drop_caches"
After which, entering dc at a command prompt would 'drop_caches'.

You can be more selective than taking a big hammer to the VFS system;

You can flush the caches of any specific file system using:
Code:
mount -o remount <mount point or device>
Note: There is no argument following 'remount' above (where you might expect rw or ro)!
This is a special version of the 'remount' function intended to flush the caches of the mentioned file system's mount point (or device).
This also works on file systems that do not support 'sync'.

Last edited by knc1; 02-21-2012 at 11:47 PM.
knc1 is offline   Reply With Quote
Old 02-23-2012, 12:48 AM   #18
idoit
Plus
idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.
 
idoit's Avatar
 
Posts: 365
Karma: 262144
Join Date: Jan 2012
Location: Tehran, Iran - Halifax, Canada
Device: iPhone 5s
6. Universal Orientation (Landscape home screen):
The existing landscape hacks don't apply on the home screen, BUT in one of my restarts, I noticed for a very short time, the home screen was displayed in landscape mode; so I guess it's possible.

Update: I made a simple extension that does EXACTLY this. All credits go to eureka. Just extract the attached file in your extension folder.

Known issues:
Screensavers are by default 600x800. I have a KT3G-SO, so when it goes to sleep I see the ad improperly but it doesn't bother me at all. Well I don't want to disable ads or alter my Kindle to show customized 800x600 ads because I like Amazon and it is not fair. All in all I'm happy with it.
Attached Files
File Type: rar universal-orientation.rar (1.2 KB, 114 views)

Last edited by idoit; 02-23-2012 at 03:55 PM.
idoit is offline   Reply With Quote
Old 02-23-2012, 12:51 AM   #19
idoit
Plus
idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.
 
idoit's Avatar
 
Posts: 365
Karma: 262144
Join Date: Jan 2012
Location: Tehran, Iran - Halifax, Canada
Device: iPhone 5s
UPDATE: This is now done. Take a look at here and here.

2. Katie Terminal:
Having a little extra line (maybe under URL/Search box) where you can type commands and the results be shown as a pop up dialog or a line at the bottom of screen (like K3).
Seems pretty tough if possible at all!

Or even nicer would be to just add another option as "Terminal" at right side of the main text box (along with Wikipedia, Dictionary, ...) Or a KT java app that simulates a terminal.


EDIT: Seems I proposed to reinvent the wheel! There already is a solution for this (AjaxTerm) in this thread but it doesn't work for KT (at least I couldn't!).

Last edited by idoit; 08-16-2012 at 01:36 AM. Reason: mission accomplished!
idoit is offline   Reply With Quote
Old 02-23-2012, 02:39 AM   #20
miguelos
Enthusiast
miguelos shares his or her toysmiguelos shares his or her toysmiguelos shares his or her toysmiguelos shares his or her toysmiguelos shares his or her toysmiguelos shares his or her toysmiguelos shares his or her toysmiguelos shares his or her toysmiguelos shares his or her toysmiguelos shares his or her toysmiguelos shares his or her toys
 
Posts: 44
Karma: 5666
Join Date: Dec 2011
Device: K3-3G, KT SO
a very good idea would be to add some options for PDF viewer
1. remove margins (a lot of space is wasted)
2. option for stable zoom-in between the pages (e.g. choosing 110% would force header & footer outside of visible area - it would improve page readability..)
3. implement rotation (not this from UI itself, but only in PDF viewer)
miguelos is offline   Reply With Quote
Old 02-23-2012, 07:43 AM   #21
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,441
Karma: 5840130
Join Date: Feb 2012
Device: Too many.
7. Enable inetd

Either inetd or one of the more modern "improved versions" of the Internet Super Server

This standard *nix utility starts network services (daemons) "on demand" - if/when they are not in use, they don't run.

Ref: http://www.netbsd.org/docs/guide/en/chap-inetd.html

A use case:

You want an httpd daemon (service in en_M$) to run for changing settings remotely, but you don't want to take up the RAM or CPU cycles of having it idling in the background.
This is a good case of using inetd - the httpd daemon doesn't run until you try to connect to it - then inetd kicks in and fires up a copy for your connection to use.

Can be used for any "on demand" network service.
knc1 is offline   Reply With Quote
Old 02-23-2012, 08:00 AM   #22
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,441
Karma: 5840130
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by knc1 View Post
Either inetd or one of the more modern "improved versions" of the Internet Super Server

This standard *nix utility starts network services (daemons) "on demand" - if/when they are not in use, they don't run.

Ref: http://www.netbsd.org/docs/guide/en/chap-inetd.html

A use case:

You want an httpd daemon (service in en_M$) to run for changing settings remotely, but you don't want to take up the RAM or CPU cycles of having it idling in the background.
This is a good case of using inetd - the httpd daemon doesn't run until you try to connect to it - then inetd kicks in and fires up a copy for your connection to use.

Can be used for any "on demand" network service.
Seems it has been included in Busybox for awhile now:
Code:
Author: Glenn L McGrath <bug1@ihug.co.nz>
Date:   Sun Feb 9 06:51:14 2003 +0000

    New applet, inetd, make httpd features more configurable, update authors, last_patch_80
    from Vladimir N. Oleynik
Which doesn't mean it was included in the Kindle Busybox build - but re-building Busybox with that feature enabled would be the smallest memory footprint way to provide it.
knc1 is offline   Reply With Quote
Old 02-23-2012, 03:51 PM   #23
idoit
Plus
idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.
 
idoit's Avatar
 
Posts: 365
Karma: 262144
Join Date: Jan 2012
Location: Tehran, Iran - Halifax, Canada
Device: iPhone 5s
Quote:
Originally Posted by knc1 View Post
Seems it has been included in Busybox for awhile now:
Code:
Author: Glenn L McGrath <bug1@ihug.co.nz>
Date:   Sun Feb 9 06:51:14 2003 +0000

    New applet, inetd, make httpd features more configurable, update authors, last_patch_80
    from Vladimir N. Oleynik
Which doesn't mean it was included in the Kindle Busybox build - but re-building Busybox with that feature enabled would be the smallest memory footprint way to provide it.
Oh this is such a useful feature! How can we go about it?

Also, I am in love with my Kindle with new universal landscape mode... I updated my previous post, so go here.

Last edited by idoit; 02-23-2012 at 03:56 PM.
idoit is offline   Reply With Quote
Old 02-23-2012, 04:19 PM   #24
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,441
Karma: 5840130
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by cscat View Post
Oh this is such a useful feature! How can we go about it?

Also, I am in love with my Kindle with new universal landscape mode... I updated my previous post, so go here.
Need to build an updated Busybox.
Simple for the developers here who have had a Build System setup for years.

Me, still waiting -
Support went into Buildroot for the Freescale processors last week.
So soon (once I invent a Kindle "def_config") will be able to build things also.

Then the telnet, ssh, ftp, http daemons can all go under "on demand" control in the inetd config file - rather than taking up RAM when not in use.

Also know we want to build usb_modeswitch -
Just for those folk who want to plug a regular sized keyboard and mouse into their Kindle.
(Yes, the USB port is an OTG version - it can run as a Host not just a Device - that is the reason for the fifth pin on the micro-usb connector - the Host/Device mode control line.)
knc1 is offline   Reply With Quote
Old 02-23-2012, 05:47 PM   #25
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,441
Karma: 5840130
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by knc1 View Post
Also know we want to build usb_modeswitch -
Just for those folk who want to plug a regular sized keyboard and mouse into their Kindle.
(Yes, the USB port is an OTG version - it can run as a Host not just a Device - that is the reason for the fifth pin on the micro-usb connector - the Host/Device mode control line.)
If someone has a microUSB HOST cable, plug it in, it might "just work" -
If not, then we will need usb_modeswitch to override the mode select line.

micro-USB HOST cables are available from your favorite high-tech supplier:
http://www.amazon.com/Micro-USB-Host.../dp/B005GGBYJ4
knc1 is offline   Reply With Quote
Old 02-24-2012, 10:36 AM   #26
yiming
Zealot
yiming is kind to children and small, furry animalsyiming is kind to children and small, furry animalsyiming is kind to children and small, furry animalsyiming is kind to children and small, furry animalsyiming is kind to children and small, furry animalsyiming is kind to children and small, furry animalsyiming is kind to children and small, furry animalsyiming is kind to children and small, furry animalsyiming is kind to children and small, furry animalsyiming is kind to children and small, furry animalsyiming is kind to children and small, furry animals
 
Posts: 109
Karma: 6744
Join Date: Dec 2011
Device: Kindle Touch
@cscat

i have the auto-rotate and Yifanlu's Launcher on my KT. the auto-rotate works well and i can use manual Orientation in the Launcher to override the auto-rotate. but, to restore the auto-rotate function i'll need to restart my KT.

i've tried your universal orientation hack, but it doesn't work. i suspect it's because it conflicts with the auto-rotate hack. do you think you can make them compatible just like Yifanlu's. thanks.
yiming is offline   Reply With Quote
Old 02-24-2012, 01:53 PM   #27
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,067
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by knc1 View Post
If someone has a microUSB HOST cable, plug it in, it might "just work" -
If not, then we will need usb_modeswitch to override the mode select line.

micro-USB HOST cables are available from your favorite high-tech supplier:
http://www.amazon.com/Micro-USB-Host.../dp/B005GGBYJ4
I bought some USB OTG cables (cheap ones with no Host Mode LED) when I discovered in the Freescale documentation that the external USB port is OTG. The internal USB port is Host only, and is available for other things on wifi-only kindles (like add-in bluetooth in place of the missing 3G modem). It did not automatically change to host mode for me, so a custom usb_modeswitch is probably required.

Even if you can route power out the OTG port, it may not be enough to power most devices. You probably need an external battery powered USB hub between the OTG cable and any USB-powered devices.

Last edited by geekmaster; 02-24-2012 at 01:57 PM.
geekmaster is offline   Reply With Quote
Old 02-24-2012, 02:27 PM   #28
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,441
Karma: 5840130
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by geekmaster View Post
Even if you can route power out the OTG port, it may not be enough to power most devices. You probably need an external battery powered USB hub between the OTG cable and any USB-powered devices.
I thought of that and almost put it into the suggestion post but left it out.

I also suggest using an external powered hub, the Kindle(s) are low power devices and that may not even be a full 5v USB interface port.

But first, have to figure out if we can make it work in host mode.

Note:
The 3G models use a USB-3G modem/radio and another interesting thing to play with (which also uses USB_modeswitch):
http://www.sakis3g.org/

Anyone interested, don't wait for me, my todo list is already pretty long.
knc1 is offline   Reply With Quote
Old 02-24-2012, 02:35 PM   #29
thomass
Wizard
thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.
 
Posts: 1,640
Karma: 1915537
Join Date: Mar 2011
Location: Türkiye
Device: Kindle 5.3.7
8- Landscape mode using the already-existed motion sensor

well, there is no need for more explenation.
thomass is offline   Reply With Quote
Old 02-24-2012, 04:57 PM   #30
idoit
Plus
idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.idoit ought to be getting tired of karma fortunes by now.
 
idoit's Avatar
 
Posts: 365
Karma: 262144
Join Date: Jan 2012
Location: Tehran, Iran - Halifax, Canada
Device: iPhone 5s
Quote:
Originally Posted by thomass View Post
8- Landscape mode using the already-existed motion sensor

well, there is no need for more explenation.
This feature was implemented a while ago by Mehdi, see this thread.

It looked fancy for me and I got excited and tried it sometime ago, but it turned out not to be what I can live with. So I like my manual universal screen rotation better. I don't personally use this.
idoit is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Torn: Nook Simple Touch, Kindle Touch, Basic Kindle dblb48 Which one should I buy? 12 12-13-2011 02:34 PM
Kindle 3, Nook Simple Touch, Kobo Touch and Libra Pro Touch jbcohen Which one should I buy? 4 06-18-2011 07:58 PM
Ideas for using the Kindle in the kitchen? Nanoox Amazon Kindle 14 12-08-2010 10:40 AM
Ideas for Kindle Apps? willCode4Beer Kindle Developer's Corner 2 02-08-2010 07:53 PM
Ideas for Kindle 2.0 markbot Amazon Kindle 20 11-26-2007 02:13 PM


All times are GMT -4. The time now is 12:57 AM.


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