I have poked and prodded in all sorts of config files, but how is Google hiding the Camera Icon/App/Launcher? Yes, I know the camera is still technically there, and can be accessed with one of many apps in the Play Store. But how is it being hidden? Here are the things I have tried, with no success:
Used Gallery.apk from another device (Nexus 4). Right after reboot, camera app was there for a few seconds, then went away.
Looked in the build.prop file. Don't see anything.
In "/system/etc/media_profiles.xml", I added <!ATTLIST EncoderProfile cameraId (0) #REQUIRED> after line 27.
In "/system/etc/permissions/android.hardware.camera.autofocus.xml", I added <feature name="android.hardware.camera" /> and <feature name="android.hardware.camera.autofocus" /> between the permissions tags.
In "/system/etc/permissions/", I added a file called "android.hardware.camera.autofocus.xml" with <feature name="android.hardware.camera.any" />, <feature name="android.hardware.camera" />, and <feature name="android.hardware.camera.autofocus" /> between the permissions tags.
Is it hardcoded in the gallery.apk, like "if device=grouper, then hide camera"? Does anyone know how the camera icon is being hidden?
Forget about it. Just use the app from the play store and forget about it.
Sent from my Nexus 4 using Tapatalk 2
scream4cheese said:
Forget about it. Just use the app from the play store and forget about it.
Sent from my Nexus 4 using Tapatalk 2
Click to expand...
Click to collapse
Clearly you did not read my post thoroughly.
Is there a rear-facing camera on your device? If not, GoogleGallery will disable camera app.
briankoko said:
Is there a rear-facing camera on your device? If not, GoogleGallery will disable camera app.
Click to expand...
Click to collapse
But how does it know that? Which config file is it looking at?
Sent from my Nexus 4 using Tapatalk 2
I'm guessing it's based on if the actual hardware is there. Noting to do with a configuration file.
That's just a guess though.
The Google shoppers app actually uses the camera and works
Sent from my HTC Raider X710e using xda app-developers app
rmkilc said:
I have poked and prodded in all sorts of config files, but how is Google hiding the Camera Icon/App/Launcher? Yes, I know the camera is still technically there, and can be accessed with one of many apps in the Play Store. But how is it being hidden? Here are the things I have tried, with no success:
Used Gallery.apk from another device (Nexus 4). Right after reboot, camera app was there for a few seconds, then went away.
Looked in the build.prop file. Don't see anything.
In "/system/etc/media_profiles.xml", I added <!ATTLIST EncoderProfile cameraId (0) #REQUIRED> after line 27.
In "/system/etc/permissions/android.hardware.camera.autofocus.xml", I added <feature name="android.hardware.camera" /> and <feature name="android.hardware.camera.autofocus" /> between the permissions tags.
In "/system/etc/permissions/", I added a file called "android.hardware.camera.autofocus.xml" with <feature name="android.hardware.camera.any" />, <feature name="android.hardware.camera" />, and <feature name="android.hardware.camera.autofocus" /> between the permissions tags.
Is it hardcoded in the gallery.apk, like "if device=grouper, then hide camera"? Does anyone know how the camera icon is being hidden?
Click to expand...
Click to collapse
Hi, rmkilc...
I'm going to go out on a huge speculative limb here (because I'm not a developer), but if I understand Android correctly, before we can directly interact with something in Android, it has to be defined as an 'Activity'...
http://developer.android.com/reference/android/app/Activity.html
http://www.mkyong.com/android/android-activity-from-one-screen-to-another-screen
---------------------
An 'activity', essentially, is just a 'window' through which we manipulate and use the app.
Many widgets (for example) don't have an 'activity'... they are just placed on the homescreen(s)... and cannot be opened directly from PlayStore once installed.
Such an example would be the Month Calendar Widget - http://play.google.com/store/apps/details?id=com.josegd.monthcalwidget&hl=en.
It cannot be opened directly as an app, in the way we would, say Angry Birds or Temple Run, because it has no defined 'activity'.
---------------------
Similarly, the camera, as a piece of hardware, has no software in the FACTORY/STOCK ROM that defines an 'activity' for it's use.
The MoDaCo Camera Launcher for Nexus 7 - http://play.google.com/store/apps/details?id=com.modaco.cameralauncher&hl=en accesses the camera via software that DOES define an 'activity' or 'window' through which we might interact with it.
---------------------
So, to conclude... and to summarise... And to answer your question...
It's not that the camera is hidden... it's just that there is no defined 'activity' via any app available in the FACTORY/STOCK ROM through which we might access it.
Rgrds,
Ged.
GedBlake said:
Hi, rmkilc...
I'm going to go out on a huge speculative limb here (because I'm not a developer), but if I understand Android correctly, before we can directly interact with something in Android, it has to be defined as an 'Activity'...
http://developer.android.com/reference/android/app/Activity.html
http://www.mkyong.com/android/android-activity-from-one-screen-to-another-screen
---------------------
An 'activity', essentially, is just a 'window' through which we manipulate and use the app.
Many widgets (for example) don't have an 'activity'... they are just placed on the homescreen(s)... and cannot be opened directly from PlayStore once installed.
Such an example would be the Month Calendar Widget - http://play.google.com/store/apps/details?id=com.josegd.monthcalwidget&hl=en.
It cannot be opened directly as an app, in the way we would, say Angry Birds or Temple Run, because it has no defined 'activity'.
---------------------
Similarly, the camera, as a piece of hardware, has no software in the FACTORY/STOCK ROM that defines an 'activity' for it's use.
The MoDaCo Camera Launcher for Nexus 7 - http://play.google.com/store/apps/details?id=com.modaco.cameralauncher&hl=en accesses the camera via software that DOES define an 'activity' or 'window' through which we might interact with it.
---------------------
So, to conclude... and to summarise... And to answer your question...
It's not that the camera is hidden... it's just that there is no defined 'activity' via any app available in the FACTORY/STOCK ROM through which we might access it.
Rgrds,
Ged.
Click to expand...
Click to collapse
Good points. The camera app or icon is part of the gallery (GalleryGoogle.apk on stock Android, Gallery2.apk on CM). Using the same gallery apk on a Nexus 4 and on a Nexus 7 results in the Nexus 4 showing the camera icon and the Nexus 7 not showing the camera icon. What I am trying to figure out is what part of the ROM is gallery looking at and deciding to hide the camera?
Code:
# am start -n com.google.android.gallery3d/com.android.camera.CameraActivity
seems to work, so it is certainly "in there" (the gallery app).
I suppose you could use baksmali to decompile /system/app/GalleryGoogle.{apk,odex} and poke around to find "why it is hidden".
there is something in there called
DisableCameraReceiver.smali
with a private method hasBackCamera() and (to the extent I understand .smali output) it disables the camera receiver based on whether or not the back camera is detected.
good luck
Related
Could anyone point me to the directory on the Kindle Fire where the icons for the apps are stored, sideloaded apps have blurry icons, for example Worms, has a blurry icon, and I was wondering if I could replace it with this one: https://lh5.ggpht.com/SVGmuCTroV4NwMeZfsX-DfdhzTVdwp9PGGi3BHTrbEV04rDJLMBykdyRdNEo3hqXCA=w124
Found it, /data/app then open the apk with an archive viewer then res/drawable/icon.png
georgeos said:
Found it, /data/app then open the apk with an archive viewer then res/drawable/icon.png
Click to expand...
Click to collapse
Can you tell me wich viewer you have used for this. And maybe you have a source for some high resolution icons?
LilaLurch said:
Can you tell me wich viewer you have used for this. And maybe you have a source for some high resolution icons?
Click to expand...
Click to collapse
Just use 7-Zip
...mhhh it does´nt work in my case. I will try to change the icon from Real Racing 2 but it doesnt work.
LilaLurch said:
...mhhh it does´nt work in my case. I will try to change the icon from Real Racing 2 but it doesnt work.
Click to expand...
Click to collapse
Double check your compression settings. When replacing files I think it's supposed to be "Store" or "None". If it's anything other than that, I don't think it will work correctly. Someone please correct me if I am wrong.
I can´t find the location of the Icon and the apk file of Real Racing 2, so can somebody give me some hint in this case?
The same with some other Apps, where are the APK Files normaly located after the installation?
Which drawable directory
I'm also experiencing the blurry carousel images from a sideloaded app. But this is an app that I'm writing myself.
In my res/ directory, I have drawable, drawable-hdpi, drawable-mdpi, and drawable-ldpi.
I've tried putting a very high res image in drawable and drawable-hdpi for the carousel image, but I'm still getting a very blown up, really low res image being used on the Fire.
<application android:label="@string/app_name"
android:icon="@drawable/ic_launcher">
is what I'm using to specify...
Which image do I need to actually be making hi res to make this work?
Thanks!
Ninjamorph Pro (paid app on market by Stericson) is an awesome utility to use for this type of thing. You can unpack, modify (including image replacement), and repack any system or market apk from your device without the need for a computer. Works well on my CDMA shooter and KF (cm7). You may recieve an error message saying you have no SD Card when you first run the app. Just run again.
Sent from my PG86100 using xda premium
APK Icon Editor
Check out the free and open-source APK editor: APK Icon Editor.
You can easily change APK icons, particularly for Kindle Fire (there are profiles for these Amazon devices).
Is it possible to rearrange the apps on a nexus player? I would like plex to be my first app
jay188 said:
Is it possible to rearrange the apps on a nexus player? I would like plex to be my first app
Click to expand...
Click to collapse
No. The more you use an app, the further left it goes. If Plex becomes your most used app, it'll move to the left most spot. I'm sure there will be other launchers such as Nova for the NPlayer in due course. Maybe we can request enough to google to get a row in the Leanback player for our own customization and slots.
IMO this is a poor way to manage position. If I get use to the position of an app and it moves on me, that forces me to relearn the position. It sounds trivial, but I'd much rather have a way to manage this so I can set my own priorities.
nimdae said:
IMO this is a poor way to manage position. If I get use to the position of an app and it moves on me, that forces me to relearn the position. It sounds trivial, but I'd much rather have a way to manage this so I can set my own priorities.
Click to expand...
Click to collapse
I agree with you, but I'd like both approaches. The current approach is good but only if there were an additional pinned row above or below it with our own shortcuts, just like the android dock on phones/tablets. I like the idea of over time the most used apps being easily usable without intervention, but for those that I rely on the most having defined positions would absolutely be preferable.
I've never launched google play movies and its still left-most. I've actually never seen them reorder themselves yet. Games and apps are in the order I installed them.
Really hope they make a "rearrange" option.
Solution [Root] for android 5.0 [NOT WORKING IN ANDROID 5.1!]
[NO LONGER WORKING IN ANDROID 5.1!]
If you have unlocked+rooted your Nexus Player and know how to modify android application databases then you are in luck.
Just open /data/data/com.google.android.leanbacklauncher/databases/launcher.db and modify the entity table. Edit the OOB_ORDER value. The lower the value, the earlier the app shows in the app menu.
You might need to reboot to see the changes.
Thanks
ariful said:
If you have unlocked+rooted your Nexus Player and know how to modify android application databases then you are in luck.
Just open /data/data/com.google.android.leanbacklauncher/databases/launcher.db and modify the entity table. Edit the OOB_ORDER value. The lower the value, the earlier the app shows in the app menu.
You might need to reboot to see the changes.
Thanks
Click to expand...
Click to collapse
Where exactly are the values for OOB_ORDER? None of my application seems to show up. I'm using Liya to edit the launcher.db
ariful said:
If you have unlocked+rooted your Nexus Player and know how to modify android application databases then you are in luck.
Just open /data/data/com.google.android.leanbacklauncher/databases/launcher.db and modify the entity table. Edit the OOB_ORDER value. The lower the value, the earlier the app shows in the app menu.
You might need to reboot to see the changes.
Thanks
Click to expand...
Click to collapse
I tried this, made a backup, copied the .db locally, changed the value OOB_ORDER for a couple apps and pushed the new version. After rebooting the launcher would not load.
Black screen, screen saver would load properly if I let it sit long enough and adb still worked... tried rebooting multiple times, tried using higher numbers instead of lower numbers, and even tried putting the backup in.... only thing that fixed was loading factory image.
Anyone successfully pull this off? Am I missing something?
ariful said:
If you have unlocked+rooted your Nexus Player and know how to modify android application databases then you are in luck.
Just open /data/data/com.google.android.leanbacklauncher/databases/launcher.db and modify the entity table. Edit the OOB_ORDER value. The lower the value, the earlier the app shows in the app menu.
You might need to reboot to see the changes.
Thanks
Click to expand...
Click to collapse
Tried this...nothing happened.
pulled the launcher.db file, edited on computer, then pushed it back to the nexus player, rebooted...and the order didn't change.
pulled the file from the nexus player again to confirm the changes took place.
jdcnosse said:
Tried this...nothing happened.
pulled the launcher.db file, edited on computer, then pushed it back to the nexus player, rebooted...and the order didn't change.
pulled the file from the nexus player again to confirm the changes took place.
Click to expand...
Click to collapse
1) The ordering seems to no longer come from the "oob_order" column in the "entity" table of launcher.db but rather the "entity_score" column in the "entity_scores" table. Go figure, but at least it's working again. See attached screenshot.
This is my current ordering - remember that lower score means earlier positioning, except for the value 0:
Code:
sqlite> select entity_score, key from entity_scores order by entity_score desc;
select entity_score, key from entity_scores order by entity_score desc;
20|com.HBO
19|com.showtime.showtimeanytime
18|com.songza.tv
17|com.google.android.play.games
16|com.dishworld
15|com.sling
15|com.google.android.music
15|com.google.android.videos
14|com.hulu.livingroomplus
14|com.android.vending
13|net.i.akihiro.halauncher
13|radiotime.player
11|com.plexapp.android
10|com.google.android.youtube.tv
8|com.google.android.apps.mediashell
8|com.netflix.ninja
7|com.google.android.apps.plus
7|org.xbmc.kodi
0|com.android.tv.settings
2) The black screen is very likely caused by bad ownership/permissions on the launcher.db file, especially if you copied it out and in again. Compare file ownership with the other files in /data/data/com.google.android.leanbacklauncher:
Code:
[email protected]:/data/data/com.google.android.leanbacklauncher # ls -l databases
ls -l databases
-rw-rw---- u0_a11 u0_a11 53248 2015-09-14 22:53 launcher.db
-rw-rw---- u0_a11 u0_a11 12824 2015-09-14 22:53 launcher.db-journal
[email][email protected]:/data/data/com.google.android.leanbacklauncher # ls -l shared_prefs
ls -l shared_prefs
-rw-rw---- u0_a11 u0_a11 303 2015-09-09 21:40 com.google.android.leanbacklauncher_preferences.xml
-rw-rw---- u0_a11 u0_a11 120 2015-09-14 22:53 inet-prefs.xml
Fix it with a simple chown/chmod if it's wrong:
Code:
chown u0_a11:u0_a11 launcher.db
chmod 660 launcher.db
(assuming that the other files are owned by u0_a11 already)
Do you guys HAVE to use the default launcher? I just found "HAL Launcher" last night, and you can change its settings to use it as the default launcher (you can still get to the default nexus launcher by holding back button). With HAL Launcher you can add, change, reorder apps, place them in categories, change the ui theme color, and a few other things. It even has a recent apps section, but you can remove that as well if you want.
for best results, after sideloading hal launcher, go into preferences and enable the feature to use it as default. it will tell you what you need to do (a pop up will ask what launcher you want to use) then restart the nexus player. works flawless as long as you dont long press the back button, then it tries going to the default launcher every time back is pressed on hal launcher.
Hal look awful imo
My leanback launcher won't move apps to the left! It only shows the order that they were installed. I'm running 6.0 and I'm not rooted. I've looked around and can't find an answer, sorry if this is a topic may have already mentioned. I've tried deleting the data and cache of the launcher, no help...
pngwolffman said:
My leanback launcher won't move apps to the left! It only shows the order that they were installed. I'm running 6.0 and I'm not rooted. I've looked around and can't find an answer, sorry if this is a topic may have already mentioned. I've tried deleting the data and cache of the launcher, no help...
Click to expand...
Click to collapse
You can't adjust this unless you root and even so massive pain to edit, so consider it as is.
It is now much easier to rearrange apps on Android TV devices if you have v1.1.4 of the Leanback Launcher.
http://www.androidpolice.com/2015/1...rder-your-apps-in-version-1-1-4-apk-download/
To the point: Anyone have any smart ideas to make the Netflix app visible to Kodi?
I bought my Nexus Player as a Kodi player to test the ability to launch android apps and hopefully get away from using PlayOn for Netflix and Hulu.
Unlike other android boxes, such as the Fire TV, I've noticed several android apps are hidden from other third party apps. Notably Netflix does not appear in either Chainfire's Sideload Launcher nor within Kodi in the Addons > Programs > Android Apps. So the app cannot be favorited. I tried using a StartAndroidActivity command with the correct apk name for Netflix "com.netflix.ninja" but that does nothing.
I'm rooted.
Much appreciation.
Does voice search --> "Go to Netflix" work for you?
habskilla said:
Does voice search --> "Go to Netflix" work for you?
Click to expand...
Click to collapse
I had to test it just now. It does however. That is a possible solution. Especially since I go straight to Kodi on startup with "XBMC Launcher".
I'd be interested however still if there was a solution, even convoluted or with some work, to make the app directly accessible from Kodi via key press.
I use the Eminence skin and do exactly like this guy, simply by adding the app as a favorite, then adding it to the start bar, works like a charm for native Android Netflix, WatchEspn, DishAnywhere, HBO GO all perfectly seamless and it drops me right back to the Kodi main screen when I exit.
http://youtu.be/PrRNqrZmFfE scroll forward to 5:58 to see launching apps.
I know there is a way to do this with other skins but Eminence makes it so simple, plus it looks great.
agwood said:
I use the Eminence skin and do exactly like this guy, simply by adding the app as a favorite, then adding it to the start bar, works like a charm for native Android Netflix, WatchEspn, DishAnywhere, HBO GO all perfectly seamless and it drops me right back to the Kodi main screen when I exit.
http://youtu.be/PrRNqrZmFfE scroll forward to 5:58 to see launching apps.
I know there is a way to do this with other skins but Eminence makes it so simple, plus it looks great.
Click to expand...
Click to collapse
And this works with the NP as well?
agwood said:
I use the Eminence skin and do exactly like this guy, simply by adding the app as a favorite, then adding it to the start bar, works like a charm for native Android Netflix, WatchEspn, DishAnywhere, HBO GO all perfectly seamless and it drops me right back to the Kodi main screen when I exit.
I know there is a way to do this with other skins but Eminence makes it so simple, plus it looks great.
Click to expand...
Click to collapse
Hey I appreciate it but that isn't really the problem. I'm familiar with the mechanics of adding android apps to various skin menus within Kodi.
That problem is that, unlike with Kodi on other android devices that I've used, on my Nexus player several apps (including Netflix and Pluto.tv) simply do not appear within other apps (including Kodi and Chainfire's Sideload Launcher). Netflix and Pluto.tv appear on the default launcher's home page and work perfectly. They can be launched via voice command and work perfectly. However within third party apps they do not appear at all.
So I've favorited several apps and added them to the home screen menu easily (Google Music and Hulu).
I would like to do the same with Netflix. However, the fact that it is hidden from within other apps prevents that. Does anyone know the mechanism behind which it some apps are hidden and what I might do to make Netflix visible from within other apps on the Nexus Player?
My sneaking suspicion is that the netflix app manifest only contains a leanback launcher activity and intent while other apps contain both leanback and normal intent (or only normal and are invisible to the leanback launcher). I plan to test this theory with a simple hello world application.
zlexy said:
My sneaking suspicion is that the netflix app manifest only contains a leanback launcher activity and intent while other apps contain both leanback and normal intent (or only normal and are invisible to the leanback launcher). I plan to test this theory with a simple hello world application.
Click to expand...
Click to collapse
Any solutions for this?
Also, Bueller? Bueller? Is this forum really debating things like the merits of an Ouya versus a Nexus Player versus whatever at length as compared to an actual technical problem like this?
txmed said:
Any solutions for this?
Also, Bueller? Bueller? Is this forum really debating things like the merits of an Ouya versus a Nexus Player versus whatever at length as compared to an actual technical problem like this?
Click to expand...
Click to collapse
Yep.
1] Download apktools (http://forum.xda-developers.com/showthread.php?t=2639400)
2] Extract the downloaded file anywhere in your pc
3] Copy the netflix apk to the "2-in" folder where you extracted APKTools
Note: I used EsFileExplorer to copy /data/app/com.netflix.ninja/base.apk to my PC
4]Double click on "Advanced ApkTool.exe" to start the tool
5] Select "2 - Decompile Files"
Note: the decompiled files will be be located in the "3-Out" folder
In the "3-Out" folder open AndroidManifest.xml using a text editor and below the line:
Code:
<category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
add the following code:
Code:
<category android:name="android.intent.category.LAUNCHER"/>
6] Save AndroidManifest.xml and select "3 - Recompile" and recompile, sign and zipalign the files.
The recompiled apk will be inside "4-Done" folder
7] Uninstall netflix and re-install from the recompiled apk.
You can now run Netflix from XBMC and the sideload launcher.
zlexy said:
Yep.
You can now run Netflix from XBMC and the sideload launcher.
Click to expand...
Click to collapse
You're awesome. I wish I could buy you a beer.
Totally worked on Netflix and Pluto.tv.
Would the long-term solution be to update Kodi to look for leanback launcher intents when assigning favorites?
xBIGREDDx said:
Would the long-term solution be to update Kodi to look for leanback launcher intents when assigning favorites?
Click to expand...
Click to collapse
I submitted a simple fix to the Kodi dev forums.
AFAIK it was committed and should be in the nightly.
I wonder, how can I achieve this without modifying the apk? It would be cumbersome to update the package at each update.
I'm trying to launch netflix with Automate, so I can configure a package, activity and intent. This configuration currently works on my nexus tablet, but on the nexus player I get an error stating there's no app that can handle that. Image here imgur.com/BBgBmm7
Edit: nevermind, found the problem. Package for Android TV is com.netflix.ninja
zlexy said:
I submitted a simple fix to the Kodi dev forums.
AFAIK it was committed and should be in the nightly.
Click to expand...
Click to collapse
Did they do anything with your submission? I still can't get NextFlix to launch from within Kodi and it's annoying as heck. The new Plex launcher thing works great, I'm just missing the ability to launch NetFlix!
Hello,
this may be a weird question for this forum (if moderators think it is wrongly placed, please push it to the correct section).
I'm a developer but have never developed anything for android. I wonder if what I want to achieve is possible or not.
My problem:
I want to use VSCO cam as my default camera (e.g. on my lockscreen I can specify a default camera to be launched by clicking on an icon)
VSCO cam has for some reason decided not to "register" as a camera app if that makes sense (in the selection screen of camera apps it doesn't show up)
So my questions are:
What does an app need to do to be recognised as a camera app by other apps? Is it as simple as an entry in a config file? Or is it a java routine? Please name all modifications that would have to occur.
I downloaded the VSCO apk and unzipped it - I should be able to modify it and then still install without problems right?
Just to state the obvious - I don't want to offer this modified app to anybody besides myself. I don't want to add it to google play or even offer it as a download somewhere. This would be just a personal project of mine.
Need Android intent filter
001mic said:
So my questions are:
What does an app need to do to be recognised as a camera app by other apps? Is it as simple as an entry in a config file? Or is it a java routine? Please name all modifications that would have to occur.
I downloaded the VSCO apk and unzipped it - I should be able to modify it and then still install without problems right?
Just to state the obvious - I don't want to offer this modified app to anybody besides myself. I don't want to add it to google play or even offer it as a download somewhere. This would be just a personal project of mine.
Click to expand...
Click to collapse
To be recognized as a camera app and be able to respond the incoming request, the Android intent filter has to be specified.
Foxbrush said:
To be recognized as a camera app and be able to respond the incoming request, the Android intent filter has to be specified.
Click to expand...
Click to collapse
Can you be a little bit more specific? Is it just a change of the Android Manifest xml file?
The file looks weirdly compressed. Can you have a look at it and tell me if you think it's possible to do the required changes...
https://dl.dropboxusercontent.com/u/6568643/AndroidManifest.xml
Cool it worked! Thanks a lot!
I had to add this intend as well to the other in order for my lockscreen app to detect it:
<intent-filter>
<action android:name="android.media.action.STILL_IMAGE_CAMERA"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
Hello,
The default 'Library' app on a NST & NST(G) ... is equipped to read pdf and epub files by default and list them out inside it.
As we already know the pdf files are not viewed best in the device's default reader app. The default library launches a pdf book into the default reader app.
I would like to know if somehow we can disable the library app from populating(picking-up) pdf files/books inside its library. This way i hope to get rid of pdf book entries from my default library.
is there some setting file for the default library app where we can uncheck pdf file format from its compatibility list ?
wouldn't it be nice to have a library full of only epub books ? would surely make our default library sparkling clean.
All Credit to @Renate NST ... for successfully accomplishing this idea to lighten up the default library app in our NST&G's ... to anybody who is interested in this ... can follow the steps found HERE
thanks for looking.
aiamuzz said:
Hello,
The default 'Library' app on a NST & NST(G) ... is equipped to read pdf and epub files by default and list them out inside it.
As we already know the pdf files are not viewed best in the device's default reader app. The default library launches a pdf book into the default reader app.
I would like to know if somehow we can disable the library app from populating(picking-up) pdf files/books inside its library. This way i hope to get read of pdf book entries from my default library.
is there some setting file for the default library app where we can uncheck pdf file format from its compatibility list ?
wouldn't it be nice to have a library full of only epub books ? would surely make our default library sparkling clean.
thanks for looking.
Click to expand...
Click to collapse
Not entirely sure about the Glowlight interface, but on the Library screen for the NST there is a drop-down menu option for displaying "all" or "books" or "shelves", etc. If you choose either "books" or "shelves" you will not see PDF files (unless you've included them in a shelf). That may be the easiest thing to do.
Installing a dedicated PDF reader will still give you access to any PDFs you may have via that app's user interface.
nmyshkin said:
Not entirely sure about the Glowlight interface, but on the Library screen for the NST there is a drop-down menu option for displaying "all" or "books" or "shelves", etc. If you choose either "books" or "shelves" you will not see PDF files (unless you've included them in a shelf). That may be the easiest thing to do.
Installing a dedicated PDF reader will still give you access to any PDFs you may have via that app's user interface.
Click to expand...
Click to collapse
@nmyshkin ... good work man ... you've kept our dinosaur of a device alive by your participation and chatter(enthusiasm) ... the community owes you among ... the many others who have from time to time kept the activity around our devices alive this far.
Yeah i am aware of the "all", "books" or "shelves" categorizations ... currently i use the shelves to minimize the cluttered library with the pdf's littered around without much use there as the nook reader is not the best reader for pdf's.
The reason i hope the PDF's do not show up even in the "All" category is because i have a lot of PDF's on my memory card, they all get populated in the default library app and unnecessarily increase the painful number of pages one has to flip through to get to a particular epub ebook burried under it.
If this could be achieved then ... preferred app per format would be ...
mobi format : Kindle
epub format : nook reader (without the clutter of the PDF files in its library)
pdf format :
ebookdroid - for a clean page flip reading experience of a fixed width PDF layout.
AVP pdf reader - for a magazine(multi-column) layout
... where double tapping a particular column in both, zooms in on the content to a readable size.
just hoping the PDF format could be unchecked from the default library app all together.
PS : i remember having the 'reboot' and 'recovery' options besides the 'power off' option before i reconfigured my NSTG lately, i just forgot how to enable the same back, Would appreciate if somebody could jog my memory on how to re-enable it back.
Power menu mod: https://forum.xda-developers.com/showthread.php?t=2171818
Can you tell me the version number for AVP PDF reader?
There are two different things here:
The first is the preferred activity for .pdf (or .epub or anything).
That's a question of whether you have another app to support it and whether you selected it in the picker.
The second thing is whether the Nook library notices and records .pdf items.
It's been a long time since I used any of the stock Nook library or reader.
In the NST, you could modify com.bn.nook.util.ReaderUtils.isSupportedFormat() to report false for pdf.
I believe that you would have to resign your whole system as the old Nook used sharedIds instead of priv-app
In the latest Nook (Glow3), you could modify com.nook.scanner.ScannerService.isNookSupported() to report false for pdf.
You could also just hack the database to delete all the pdfs.
An After Insert Trigger would do the job.
Unfortunately, I have no populated B&N databases to demonstrate this.
Renate NST said:
There are two different things here:
The second thing is whether the Nook library notices and records .pdf items.
It's been a long time since I used any of the stock Nook library or reader.
In the NST, you could modify com.bn.nook.util.ReaderUtils.isSupportedFormat() to report false for pdf.
I believe that you would have to resign your whole system as the old Nook used sharedIds instead of priv-app
'
'
You could also just hack the database to delete all the pdfs.
An After Insert Trigger would do the job.
Unfortunately, I have no populated B&N databases to demonstrate this.
Click to expand...
Click to collapse
thanks @Renate NST ...
Yup i am looking at the second option where the library does not notice pdf files ...
will reporting 'com.bn.nook.util.ReaderUtils.isSupportedFormat()' as false, render the library unable to record pdf files ?
If so ... a noob instruction set ... on how one could go about reporting the ...isSupportFormat to false ?
and about hacking the database to delete all the pdf's ... we will have carry out the deleting exercise everytime one adds new pdf files or reboots the nook ... that would be cumbersome.
look forward to the sought instruction set to report supported format as false ...
thanks.
nmyshkin said:
Power menu mod: https://forum.xda-developers.com/showthread.php?t=2171818
Can you tell me the version number for AVP PDF reader?
Click to expand...
Click to collapse
thanks for the link ... @nmyshkin ...
I am using version 2 versions ...
APV PDF Viewer 0.4.1.0 (41001)
found the following entries in 'LibraryPreferences.xml'
Code:
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
<int name="view_type_2" value="4" />
<int name="view_type_0" value="0" />
<int name="media_type" value="5" />
<int name="sort_type_4" value="0" />
<int name="sort_type_5" value="0" />
<int name="view_type_7" value="0" />
<int name="view_type_5" value="0" />
<int name="view_type_4" value="2" />
</map>
any values to be modified here to disable PDF file type ?
aiamuzz said:
found the following entries in 'LibraryPreferences.xml'
Code:
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
<int name="view_type_2" value="4" />
<int name="view_type_0" value="0" />
<int name="media_type" value="5" />
<int name="sort_type_4" value="0" />
<int name="sort_type_5" value="0" />
<int name="view_type_7" value="0" />
<int name="view_type_5" value="0" />
<int name="view_type_4" value="2" />
</map>
any values to be modified here to disable PDF file type ?
Click to expand...
Click to collapse
My guess is no. The values in my file are slightly different and I'd hazard a guess that these apply to the current state of the drop-down menus in the library.
aiamuzz said:
... everytime one adds new pdf files or reboots the nook ... that would be cumbersome.
Click to expand...
Click to collapse
No, a trigger would act on the insert automatically and delete or disable it immediately.
The other approach to modify the code, try using apktool.
I know that it's a bit cumbersome to rebuild apk's, but you might find it a useful skill to learn.
Code:
apktool d whatever.apk
<modify something>
apktool b whatever.apk
<sign using jarsigner and your signature>
Unfortunately, you have an NST which requires resigning *everything*.
Renate NST said:
No, a trigger would act on the insert automatically and delete or disable it immediately.
The other approach to modify the code, try using apktool.
I know that it's a bit cumbersome to rebuild apk's, but you might find it a useful skill to learn.
Code:
apktool d whatever.apk
<modify something>
apktool b whatever.apk
<sign using jarsigner and your signature>
Unfortunately, you have an NST which requires resigning *everything*.
Click to expand...
Click to collapse
hmmmm ... looks way above my pay grade currently ... reverse engineering an apk that is !!!
PS : I have decompiled the library app and extracted the java source codes ... i tried to read the smali files and java files ... shortlisted two files that could possibly hold the key to accomplish the desired functionality ... but that's about it ... i currently do not possess the skill to modify and rebuild the Library apk. I can post the smali files if anybody wants to help modify the relevant parts of code.
Renate NST said:
There are two different things here:
'
'
'
You could also just hack the database to delete all the pdfs.
An After Insert Trigger would do the job.
Unfortunately, I have no populated B&N databases to demonstrate this.
Click to expand...
Click to collapse
Could a more detail instruction on how to attempt the database hack ... possible ?
thanks
Well, let's try an easy test first.
I fired up my old NST to take a look.
I don't have the B&N reader or library on it, so I don't know if this will do the job.
Try this:
Code:
# cd /data/data/com.bn.nook.reader.activities/databases
# ls
...
readerlocal.db
...
# sqlite3 readerlocal.db
sqlite> select ean from readerlocal where ean like '%.pdf';
... <bunches of pdf files>
sqlite> delete from readerlocal where ean like '%.pdf';
sqlite> .q
#
Then do a restart and see if the stuff is missing from the library and how long it takes B&N to put it all back.
If this clears it out of the library, fine, we can work on the automatic trigger.
Renate NST said:
Well, let's try an easy test first.
I fired up my old NST to take a look.
I don't have the B&N reader or library on it, so I don't know if this will do the job.
Try this:
Code:
# cd /data/data/com.bn.nook.reader.activities/databases
# ls
...
readerlocal.db
...
# sqlite3 readerlocal.db
sqlite> select ean from readerlocal where ean like '%.pdf';
... <bunches of pdf files>
sqlite> delete from readerlocal where ean like '%.pdf';
sqlite> .q
#
Then do a restart and see if the stuff is missing from the library and how long it takes B&N to put it all back.
If this clears it out of the library, fine, we can work on the automatic trigger.
Click to expand...
Click to collapse
This seemed to be working at the time of execution (although there is no feedback when files are "deleted"?), but it did not list all PDF files. I recently downloaded a copy of the newspaper in PDF form and that is in the Library. This was not listed by sqlite. Instead, long gone items were listed.
In any case, when I exited and rebooted, the newspaper was still in the Library (or "back"). When I was writing the book cover "screensaver" app, there was another db besides readerlocal which seemed to contain similar info but I've forgotten what it was.
nmyshkin said:
Instead, long gone items were listed.
Click to expand...
Click to collapse
Well, then it's just using the regular MediaScanner.
If you hack that then a PDF viewer that relies on it may not enumerate PDF's.
Of course you can still select a PDF in a file manager and open it in your viewer.
As I said, I have neither a B&N Reader nor B&N assets on any of my devices.
Ok, try this one:
Code:
# cd /data/data/com.android.providers.media/databases
# sqlite3 internal.db
sqlite> select _data from docs;
...
sqlite> select _data from docs where _data like '%.pdf';
...
sqlite> update docs set valid=0 where _data like '%.pdf';
sqlite> .q
#
Renate NST said:
Well, then it's just using the regular MediaScanner.
If you hack that then a PDF viewer that relies on it may not enumerate PDF's.
Of course you can still select a PDF in a file manager and open it in your viewer.
As I said, I have neither a B&N Reader nor B&N assets on any of my devices.
Ok, try this one:
Code:
# cd /data/data/com.android.providers.media/databases
# sqlite3 internal.db
sqlite> select _data from docs;
...
sqlite> select _data from docs where _data like '%.pdf';
...
sqlite> update docs set valid=0 where _data like '%.pdf';
sqlite> .q
#
Click to expand...
Click to collapse
OK, so this listed the entire library contents, including the one current PDF file. I guess it also accepted the final command (no feedback), but when I rebooted, the PDF was still (or back) in the Library. I also checked the Library just before rebooting and the PDF was still there.
nmyshkin said:
... the PDF was still there.
Click to expand...
Click to collapse
Yeah, I was just trying to see if the B&N stuff paid attention to the "valid" column, apparently not.
OTOH, if you only have one PDF, why is this such an issue???
Code:
# cd /data/data/com.android.providers.media/databases
# sqlite3 internal.db
sqlite> delete from docs where _data like '%.pdf';
sqlite> .q
#
Renate NST said:
Yeah, I was just trying to see if the B&N stuff paid attention to the "valid" column, apparently not.
OTOH, if you only have one PDF, why is this such an issue???
Click to expand...
Click to collapse
LOL, actually, I'm not the OP! But I was curious to see if such a manipulation was possible. I still think it is simplest to just choose the display "Books" or "Shelves" in the Library. That way you don't see PDFs unless you specifically put them on a shelf. Meanwhile your dedicated PDF app can be directed to the PDF files.
Renate NST said:
Code:
# cd /data/data/com.android.providers.media/databases
# sqlite3 internal.db
sqlite> delete from docs where _data like '%.pdf';
sqlite> .q
#
Click to expand...
Click to collapse
This instruction removes the PDF file from the Library immediately, or as fast as I can get there after closing the terminal window.
The PDF file reappears in the Library on reboot, as you might expect. Like I said, I think it's just simpler to choose a Library display option that excludes PDF files. Something by Emerson regarding a foolish consistency
nmyshkin said:
Something by Emerson regarding a foolish consistency
Click to expand...
Click to collapse
Well, the (artifical) constraints on this were to do it without modifying the apk.
Code:
CREATE TRIGGER no_pdfs AFTER INSERT ON docs BEGIN DELETE FROM docs WHERE _data LIKE '%.pdf'; END;
That's it, put it in your database.