A while ago I found a tip somewhere on how to get to some additional hidden android browser settings including how to change the user agent string so that the browser would identify itself as a desktop browser or iPhone browser while surfing.
This setting is reset between sessions, I didn't use it frequently and eventually forgot how to go about making the change.
Recently I had a need to access these hidden browser settings again and it took quite a long and frustrating search effort to finally locate this information which does not seem to be widely publicized. So, in an effort to save anyone else this trouble, I figured I would post the information on how to do this on a couple Android boards that I frequent and also include a few words that might be picked up as search terms for anyone else trying to find this info. The procedure is very simple. I currently have an HTC Sprint Hero running Android 1.5, so I'm not sure what other devices or builds this will work on...
Open the Android web browser. In the address bar enter 'about:debug' where you would normally enter a URL and hit enter or Go. Be sure to erase the 'http://www.' that the browser likes to leave in the address bar for you. No page will load and you may or may not get a pop-up message 'Debug mode'. But if you now go to Menu > More > Settings in the browser and scroll to the bottom of the list, you should see a new group of options under the 'Debug' heading. The bottom setting is 'UAString' and if selected will give you the option of enabling your browser to identify itself as Android, Desktop or iPhone. Results after making this switch have been mixed, but go ahead and give it a try if you have a need to. I'm not sure what the other options do, so use at your own risk.
Feel free to leave a reply if you found this information helpful, or if it does or does not work on your particular device / build.
search terms: Android Browser Hidden Debug Settings Change User Agent String Identify Desktop Firefox iPhone about:debug UAString
way to go, thank you for the information. might come in handy.
I am trying to get the Library and Reader apks from the 2.1 working on cm7. I am fairly close (I hope), the next thing I have to do is sign the apks with the same key as the other apks that share the "media" userid.
If you copy over the following files you will get to where I am at.
[not sure what apks I will need just yet, so this might change]
Code:
/system/app/CryptoServer.apk
/system/app/GlobalSearch.apk
/system/app/Home.apk
/system/app/Library.apk
/system/app/Reader.apk
copy these supporting libraries/files
Code:
/system/framework/bncloudapi.jar
/system/framework/com.bn.authentication.jar
/system/framework/com.bn.cloud.jar
/system/framework/com.bn.gpb.jar
/system/framework/com.bn.provider.utils.jar
/system/lib/libbndeviceinfo.so
/system/lib/libbravodeviceinfo.so
/system/lib/libpdfhost.so
/system/etc/permissions/com.bn.app.crypto.xml
/system/etc/permissions/com.bn.app.deviceinfo.xml
Edit the following file and add the information below
Code:
/system/etc/permissions/platform.xml
This will declare the library in order for the apps to use it.
Code:
<!-- This is a list of all the libraries available for application
code to link against. -->
<library name="android.test.runner"
file="/system/framework/android.test.runner.jar" />
<library name="javax.obex"
file="/system/framework/javax.obex.jar"/>
<library name="com.bn.gpb"
file="/system/framework/com.bn.gpb.jar"/>
<library name="bncloudapi"
file="/system/framework/bncloudapi.jar"/>
<library name="com.bn.cloud"
file="/system/framework/com.bn.cloud.jar"/>
<library name="com.bn.authentication"
file="/system/framework/com.bn.authentication.jar"/>
<library name="com.bn.provider.utils"
file="/system/framework/com.bn.provider.utils.jar"/>
Once you have all this in place, restart the device. Logcat will complain about the wrong certificate for the user android.media.
My next steps are to find out which apks on cm7 use this shared id and resign them all with the same key.
Once that is done, I will launch the Library and Reader with the following commands in adb to attempt to start the activities:
Reader
Code:
am start -a android.intent.action.VIEW -n com.bn.nook.reader.activities/com.bn.nook.reader.activities.ReaderActivity
Library
Code:
am start -a android.intent.action.MAIN -n com.bn.nook.library/com.bn.nook.library.LibraryMainActivity
Very interesting concept. Possibly post in other developers sections than the NC - you may get some support.
I'm not a coder but I follow the concept.
I hope you and others are able to get this to work, because the stock reader app is my favorite.
Not sure if you've already caught this, but from looking at files so far in the APK I think there is a call being made to check for the version of android (specifically Android SDK 7 (2.1)). Is this something you got around by recompiling it?
I've made more progress. I signed the apks with ZipSigner (free in the market). I am getting some force closes trying to run the Library right now, which means I probably need to sign more of the BN apks.
FYI, if anybody else wants to give this a shot, my steps were:
1. edit the apk with 7zip and remove the META-INF dir (not sure if this is required by zipsigner) to unsign it
2. push the unsigned apk to the nook's sdcard
3. From the nook run ZipSigner and choose "media" for the key
4. sign it
5. copy the signed apk to /system/app
If you do this with the Library you should see it show up in the app drawer.
i would love to see this working
Pyrot1c said:
i would love to see this working
Click to expand...
Click to collapse
Agree'd I tried this a while back, but I really know nothing about dev stuff for android, so I didn't get far, I was really hoping someone with the know how would do this.
More Power to you. Can't wait to see this working, the library and shop apps that come with the nook color, are so much better than the Nook app off the market.
I've made a little more progress. I had to decompile the cm7 framework.jar and add some files from nook's framework.jar. I also had to merge changes into 2 files. This was all in order to get the Library app up and running. I have it loading up and I am able to see my sd card.
When I click on an epub it tries to launch the Reader but for some reason the Reader app isn't finding the libpdfhost.so shared library.
I will post instructions on what to do to the framework.jar to get the Library app up and running, but I think long-term it won't be feasible to have since the changes will need to be applied every cm7 update.
What will probably happen is I will make an app that handles epub intents and passes that off to the Reader app. The Library is adding some extra info when it starts the Reader app so I will need to copy that.
This will all be possible once I figure out why the shared library isn't being loaded properly.
Nice job man! Keep it going
Would love to see this working as well keep up the good work
Really cool.
Great progress so far. If you need a tester I'm.
I completely understand why CM can't distribute B&N software, but often it is not recognised that to many of us, the Nook Color is a family device. So it would be great if we can make these mods ourselves.
With the Market Nook app not having newspapers and magazines or NC childrens books, we still have to accommodate the entire family, in which some members of mine, still think of Gingerbread only as a type of cookie.
While I think about it...mmm ..could the library not be found because the original app's code was written to look within the file structure of Eclair instead of Gingerbread and Ext4? Or have you completely rewritten the code for the new file structure? Just thinking on my feet before I seriously studied the posted commands.
Thanks again!
Following this thread with great excitement. I would love to be able to run CM7 but still have the stock nook color app (which supports magazines, nookbooks for kids, etc.). Keep up the great work!!!!
/Kevin
OMG this would be awesome!!!
JoshMiers said:
I've made a little more progress. I had to decompile the cm7 framework.jar and add some files from nook's framework.jar. I also had to merge changes into 2 files. This was all in order to get the Library app up and running. I have it loading up and I am able to see my sd card.
When I click on an epub it tries to launch the Reader but for some reason the Reader app isn't finding the libpdfhost.so shared library.
I will post instructions on what to do to the framework.jar to get the Library app up and running, but I think long-term it won't be feasible to have since the changes will need to be applied every cm7 update.
What will probably happen is I will make an app that handles epub intents and passes that off to the Reader app. The Library is adding some extra info when it starts the Reader app so I will need to copy that.
This will all be possible once I figure out why the shared library isn't being loaded properly.
Click to expand...
Click to collapse
Have you given libpdfhost.so the correct permissions? If not chmod that mofo.
I attempted this a few weeks back myself. Your first post describes my findings exactly, including which files to copy over and adding the shared libs to platform.xml. Your followup post on modding the framework and getting the Library to stay open without FC is further than I got, however. If you want to compare notes, hit me on freenode, #nookie.
In the end, I gave up primarily because the work involved seemed to not be work it considering the Nook app from the market is quite good. The only thing it lacks is magazine subscriptions, I think. I might like a second look considering you seem to be getting closer.
-Muffin
that would be real cool if you guys could make this work.
I wish i knew how to make apps... but i'm not talented like that unfortunately.
anyone got an idea as to how to deal with the home button not working after upgrade? how about clearing of opened up apps in the notification section? how about closure of apps after being done with them as not all apps have exit button ?
i'd appreciate any comments.
thanks
Subscribed. This is the only thing keeping me from upgrading to a Froyo/GB/Honeycomb build.
Also sub'ed ... about to go with a dual-boot Stock+Froyo but would love to have the app on Froyo so I could dump stock.
This is the only thing holding me back from completely getting rid of stock. I actually use Aldiko for reading most of my books but am really looking forward to being able to read magazines from CM7.
I just wanna say keep up the good work. Your progress looks promising thus far.
Having this as an option would be great... seriously.
Work was busy last week so I didn't have much time to look into this.
I have hit a few potentially serious roadblocks. Other than needing to modify the framework.jar (with fairly simple changes) I will also need to either modify the MediaProvider.apk or write my own media provider that declares the content:// URLs that the Reader and Library apps expect.
I figured out how to launch the Reader apk from the commandline, so it will be trivial to write a front-end to do this when an epub is clicked. Also, I have gottem the Reader app to display the first page of my epub before force closing (due to unhandled content:// intents).
I was going to just stop working on this since Aldiko is suitable for my needs right now, but judging by the replies I will keep banging on it and try and write a media provider for all the content intents being sent.
I am developing my first android app, I have been studying javascript for a few months, and have manged to get it down pretty well, along with creating some fair applications with it.
This is my first android application, and please take into account that i started it less then 5 hours ago. Ill post on this thread whenever I run into problems to hopefully get some help.
Here is my aplication currently:
(attached)
nothing actually "does anything" right now, except the button its just a XML screen and a splash screen really.
Here is a project i did in JDK which i am trying to "Mimick":
The first problem i am having right now is that the background that i am trying to put on to my application is not showing up in the XML properties "Background" under drawable. The Background is saved in all 3 of the draw able folders under rec. Whenever i try to add the background manually with code i get this error.
Failed to convert @drawable/background3 into a drawable
Couldn't resolve resource @drawable/background3
Click to expand...
Click to collapse
Secondly I am trying to figure out how to send the numbers entered into the "editText" objects to the main java method. I used actionListeners in java but i don;t know here. No need to explain it i would be very appreciative if someone could just point me in the right direction.
Hi everyone!
For those of you who want to give some extra behaviour to the browser key on the dock, here's one solution.
Although mod Aroma "kind of" does this, it should be noted that this solution is easier to recover from.
The browser key launchs any apk with ˋcom.android.browser.BrowserActivity´ as main activity, so I made a small app that mimics that.
It gathers a list of installed browsers and prompts a choice to the user; With the help of intents.
You can build it directly within the prime using AIDE, as it was coded in it.
GitHub repository: github.com/bit2shift/BrowserShortcut
In order to install it, you first need to remove the stock browser. Use Titanium Backup or ES File Explorer.
Install the replacement app as usually.
A screenshot of its choice prompt is attached.
EDIT: The google homepage is the URL used to query the installed browsers and start the chosen one. You can change it to something else.
TIP: For some browsers, about:blank does not get recognized properly.
Moderators: If this thread fits better on the development board, feel free to move it there.
I downloaded and started using "terminal-launcher" as my homescreen (available from Google Play Store); it's amazing, simple, and has super-low-memory usage, but...
If you have multiple apps with the same name (I have two called Calendar and two called Messenger) it can only launch one of them (due to being text based and the names sharing text). I asked the developer if he could remedy but he (very politely) said he'd moved on and I should develop it if I wanted to. I have enough knowledge of java to know roughly what is going on in his script (roughly!), but not enough knowledge to make the change required, recompile, or pretty much anything really useful.
His script is on github.com/mattpvaughn/terminal-launcher but I can't post the link as I'm a newbie (but that basically was the link).
My theory is that either:
it appends app names (where multiples exist) with ~1, ~2, etc
it lists app ids next to the names (it lists app names when you type "apps" on your homescreen) and allows launch via app id
it does something more clever than I can come up with (this is the more likely option
To be honest, this is a great launcher that just needs a final polish (TUI console launcher crashes too much as it's script is too involved, this launcher has tried to keep script to a bare minimum); unfortunately there aren't enough comment lines to guide an inept idiot like me through adjusting the script.
Any ideas?