02-20-2017, 05:43 AM | #1 |
Connoisseur
Posts: 69
Karma: 10
Join Date: May 2016
Location: Gold Town
Device: kindle paperwhite 3, kindle oasis 2
|
Disable search indexing by modifying the java classes
With many trial and errors, I finally find a way to disable search indexing on any conditions.
First, dump the /opt/amazon/ebook/lib/kafindexer.jar file in your kindle's rootfs with the KUAL extension named kindle explorer or usbnetwork for modification. Then modify the "allowedToStartIndexing" method of \com\amazon\kindle\indexer\bundle\IndexerThread.cl ass file in the dumped /opt/amazon/ebook/lib/kafindexer.jar file like this to disable the indexing thread. Code:
aload_0 getfield com/amazon/kindle/indexer/bundle/IndexerThread/isBatteryCharging Z ifne 13 aload_0 invokespecial com/amazon/kindle/indexer/bundle/IndexerThread/isBatteryLow()Z ifeq 13 iconst_0 aload_0 ldc_w "not allowed to index: NOT ENOUGH BATTERY" invokespecial com/amazon/kindle/indexer/bundle/IndexerThread/logIndexerPauseState(Ljava/lang/String;)V ireturn pop aload_0 invokespecial com/amazon/kindle/indexer/bundle/IndexerThread/isBatteryTempOK()Z ifeq 22 iconst_0 aload_0 ldc_w "not allowed to index: BATTERY TEMP NOT OKAY" invokespecial com/amazon/kindle/indexer/bundle/IndexerThread/logIndexerPauseState(Ljava/lang/String;)V ireturn iconst_0 getstatic com/amazon/kindle/indexer/bundle/IndexerThread/searchesInProgressCount I ifge 29 iconst_0 aload_0 ldc_w "not allowed to index: SEARCH IN PROGRESS" invokespecial com/amazon/kindle/indexer/bundle/IndexerThread/logIndexerPauseState(Ljava/lang/String;)V ireturn iload_1 ifeq 39 getstatic com/amazon/kindle/indexer/bundle/IndexerThread/LOW_HEAP_THRESHOLD J invokestatic com/amazon/kindle/indexer/bundle/IndexerThread/lowHeap(J)Z ifne 39 iconst_0 aload_0 ldc_w "not allowed to index: LOW HEAP" invokespecial com/amazon/kindle/indexer/bundle/IndexerThread/logIndexerPauseState(Ljava/lang/String;)V ireturn iload_1 ifne 49 aload_0 getfield com/amazon/kindle/indexer/bundle/IndexerThread/isSystemMemoryNormal Z ifeq 49 iconst_0 aload_0 ldc_w "not allowed to index: LOW System Memory" invokespecial com/amazon/kindle/indexer/bundle/IndexerThread/logIndexerPauseState(Ljava/lang/String;)V ireturn aload_0 getfield com/amazon/kindle/indexer/bundle/IndexerThread/isAudioPlaying Z ifeq 57 iconst_0 aload_0 ldc_w "not allowed to index: AUDIO IS PLAYING" invokespecial com/amazon/kindle/indexer/bundle/IndexerThread/logIndexerPauseState(Ljava/lang/String;)V ireturn aload_0 getfield com/amazon/kindle/indexer/bundle/IndexerThread/userStoreIsAvailable Z ifeq 65 iconst_0 aload_0 ldc_w "not allowed to index: USER STORE NOT AVAILABLE" invokespecial com/amazon/kindle/indexer/bundle/IndexerThread/logIndexerPauseState(Ljava/lang/String;)V ireturn aload_0 getfield com/amazon/kindle/indexer/bundle/IndexerThread/suspendAbort Z ifne 73 iconst_0 aload_0 ldc_w "not allowed to index: GOING TO SUSPEND" invokespecial com/amazon/kindle/indexer/bundle/IndexerThread/logIndexerPauseState(Ljava/lang/String;)V ireturn aload_0 getfield com/amazon/kindle/indexer/bundle/IndexerThread/isIndexerBlockingAppOn Z ifeq 90 aload_0 getfield com/amazon/kindle/indexer/bundle/IndexerThread/isScreenSaver Z ifne 90 getstatic com/amazon/kindle/indexer/bundle/IndexerThread/isAllowedOnlyForCloudIndex Z ifeq 85 getstatic com/amazon/kindle/indexer/bundle/IndexerThread/LOG Lcom/amazon/ebook/util/log/e; ldc_w "Indexer Paused to Index: Allowing CloudIndex to merge" invokevirtual com/amazon/ebook/util/log/e/NBb(Ljava/lang/String;)V goto 90 aload_0 ldc_w "not allowed to index: Indexer blocking APP IS IN USE" invokespecial com/amazon/kindle/indexer/bundle/IndexerThread/logIndexerPauseState(Ljava/lang/String;)V iconst_0 ireturn getstatic com/amazon/kindle/indexer/bundle/IndexerThread/abortIndexing Z ifne 97 iconst_0 aload_0 ldc_w "not allowed to index: INDEXING DISABLED" invokespecial com/amazon/kindle/indexer/bundle/IndexerThread/logIndexerPauseState(Ljava/lang/String;)V ireturn invokestatic com/amazon/kindle/indexer/S/WKc()Lcom/amazon/kindle/indexer/SearchSDK$FileFactory; aconst_null invokeinterface com/amazon/kindle/indexer/SearchSDK$FileFactory/zu(Ljava/lang/String;)J 2 ldc2_w 256 lcmp ifle 108 iconst_0 aload_0 ldc_w "not allowed to index: NOT ENOUGH FILE SPACE" invokespecial com/amazon/kindle/indexer/bundle/IndexerThread/logIndexerPauseState(Ljava/lang/String;)V ireturn aload_0 ldc_w "allowed to index: ALL CONDITIONS MET" invokespecial com/amazon/kindle/indexer/bundle/IndexerThread/logIndexerPauseState(Ljava/lang/String;)V iconst_1 ireturn After that, compress the class file to the jar file and push the jar file into the corresponding place of your kindle's rootfs. Now I post the already-modified file for fw 5.8.7 Last edited by Mr.Samuel; 02-20-2017 at 11:20 AM. Reason: details |
02-20-2017, 05:46 AM | #2 |
Connoisseur
Posts: 69
Karma: 10
Join Date: May 2016
Location: Gold Town
Device: kindle paperwhite 3, kindle oasis 2
|
And I still have a question:
How to modify the functions of "Quick Action" menu? I want to modify the second button as "Browser", but after I make change to the javascripts in webkit-1.0 folder, it does not make any changes. Isn't it in the webkit folder? |
Advert | |
|
02-20-2017, 11:37 AM | #3 |
Connoisseur
Posts: 69
Karma: 10
Join Date: May 2016
Location: Gold Town
Device: kindle paperwhite 3, kindle oasis 2
|
The way of disabling search indexing is helpful for kindlers who thinks the search index function is not very useful and want to save the space and battery of kindle.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Disable search history? | Under the Covers | Editor | 38 | 07-19-2020 11:46 AM |
Disable Quick Search Auto-Submit? | ingmar | Library Management | 2 | 06-11-2014 04:35 AM |
Enable/disable search highlighting | katiez | Library Management | 2 | 12-05-2013 02:42 PM |
Disable indexing (search) = longer battery life! | statethatiamin | Kindle Developer's Corner | 58 | 05-02-2012 07:58 AM |
Question about disable indexing permanently by disabling access to "Search Indexes" | WS64 | Kindle Developer's Corner | 1 | 12-17-2011 05:51 PM |