User:Patch

From MobileRead
Jump to: navigation, search

Contents

PRS-T1

Triggers

Recently opened

 CREATE TRIGGER recently_opened_trigger AFTER UPDATE OF reading_time ON books
 BEGIN
    UPDATE books SET added_date = 0 WHERE _id = new._id AND reading_time NOT NULL;
    UPDATE books SET added_date = reading_time WHERE added_date = 0 AND _id <> new._id;
 END

based on this hack original thread

Updating original font

All fonts

  • AmasisMTW1G-Bold.otf
  • AmasisMTW1G-BoldItalic.otf
  • AmasisMTW1G-Italic.otf
  • AmasisMTW1G.otf
  • FrutigerNeueLTW1G-Bold.otf
  • FrutigerNeueLTW1G-BoldIt.otf
  • FrutigerNeueLTW1G-Italic.otf
  • FrutigerNeueLTW1G-Regular.otf
  • HelveticaMonospacedW1G-Bd.otf
  • HelveticaMonospacedW1G-BdIt.otf
  • HelveticaMonospacedW1G-It.otf
  • HelveticaMonospacedW1G-Rg.otf
  • PalatinoNovaW1G-Bold.otf
  • PalatinoNovaW1G-BoldItalic.otf
  • PalatinoNovaW1G-Italic.otf
  • PalatinoNovaW1G-Regular.otf
  • ReallyNo2LTW1G-Bold.otf
  • ReallyNo2LTW1G-BoldItalic.otf
  • ReallyNo2LTW1G-Italic.otf
  • ReallyNo2LTW1G-Regular.otf
  • UniversNextW1G-Bold.otf
  • UniversNextW1G-BoldItalic.otf
  • UniversNextW1G-Italic.otf
  • UniversNextW1G-Regular.otf
  • VerdanaW1G-Bold.otf
  • VerdanaW1G-BoldItalic.otf
  • VerdanaW1G-Italic.otf
  • VerdanaW1G.otf
  • SWNMTeb.ttc (=> SYNMinIWA-Th or SYMinIWA-Th)
  • Clockopia.ttf
  • DroidSans-Bold.ttf (=> HelveticaNeueLTW1G-Bd)
  • DroidSans.ttf (=> HelveticaNeueLTW1G-Roman)
  • DroidSansArabic.ttf
  • DroidSansFallback.ttf
  • DroidSansHebrew.ttf
  • DroidSansMono.ttf
  • DroidSansThai.ttf
  • DroidSerif-Bold.ttf
  • DroidSerif-BoldItalic.ttf
  • DroidSerif-Italic.ttf
  • DroidSerif-Regular.ttf
  • tt0003m_.ttf (=> Swis721 BT Roman)
  • tt0011m_.ttf (=> Dutch801 Rm BT Roman)
  • tt0419m_.ttf (=> Courier10 BT Roman)

Example

 @font-face {font-family: serif; font-weight: normal; font-style: normal;  src: url(res:///ebook/fonts/AmasisMTW1G.otf)}
 @font-face {font-family: serif; font-weight: normal; font-style: italic;  src: url(res:///ebook/fonts/AmasisMTW1G-Italic.otf);}
 @font-face {font-family: serif; font-weight: bold; font-style: normal;  src: url(res:///ebook/fonts/AmasisMTW1G-Bold.otf);}
 @font-face {font-family: serif; font-weight: bold; font-style: italic;  src: url(res:///ebook/fonts/AmasisMTW1G-BoldItalic.otf);}

original thread

Modifing APKs

There are a bunch of extra steps that need to be done to the APK in order to modify it and get it to work on the reader afterwards:

Tools needed: apktool, smali and dexopt-wrapper.

Procedure:

  1. Disassemble EbookHome.odex using baksmali (baksmali -d frameworkdir -a 8 -x EbookHome.odex)
  2. Reassemble into classes.dex using smali (smali -a 8 out -o classes.dex)
  3. Put classes.dex into EbookHome.apk
  4. Unpack EbookHome.apk with apktool (apktool d EbookHome.apk)
  5. Make any changes in the newly created EbookHome directory
  6. Repack with apktool, new apk ends up in EbookHome/dist directory (apktool d EbookHome)
  7. Put the new apk on the sd card of the device
  8. Run dexopt-wrapper on the device to get a new EbookHome.odex (in a shell on the device: dexopt-wrapper EbookHome.apk EbookHome.odex)
  9. Remove classes.dex from the apk
  10. Sign the apk with a suitable certificate
  11. Run zipalign on the apk
  12. Install on the reader

via morkl's post

Personal tools
Namespaces

Variants
Actions
Navigation
MobileRead Networks
Toolbox