Almost working: Stock 2.1 Nook Color Reader and Library - Nook Color Themes and Apps

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.

Related

OpenGL ES 2.0 games possibility

I've been hankering to start porting a game I've been working on(originally was going to be for Zune HD but they haven't released the damn 3D SDK. Video of it running in windows is available on youtube, where my username is marcusmaximus04) to android but was hesitant due to the lack of OpenGL ES2.0 support in the Android SDK. However, looking through the file system on my nexus one, I spotted the file libGLESv2.so, which appears to be the shared object file for exactly this!
Obviously, I still can't use the normal SDK to use this, but in theory, one could use the NDK to use OpenGL ES 2.0 features(shaders, etc) through that shared object file.
The purpose of this post is three-fold. One I want to know if anyone has any background with using OpenGL through the NDK or knows of any tutorials for doing so(I'm not entirely sure how that would work...). Two, I wanted to bring this to the attention of all the devs out there who might be holding off from using ES 2.0 features. And three, I wanted to let everyone else know that such a thing is possible, just 'cause it's exciting.
At any rate, even if I can't find any tutorials I'll probably start plugging away at getting this to work and this should make for an exciting couple weeks/months.
Since we have this pretty well working(even on non-rooted phones) I'll post a sample apk. It doesn't look like much, but it does prove that we're using OpenGL ES 2.0(this will only work on the Nexus One). I'll also post the libGLESv2_adreno.so shared library in the same zip file. Enjoy .
From http://developer.android.com/guide/topics/graphics/opengl.html:
note that though Android does include some basic support for OpenGL ES 1.1, the support is not complete, and should not be relied upon at this time.
Click to expand...
Click to collapse
so official 2.0 support might be a bit off :/
kozm0naut said:
From http://developer.android.com/guide/topics/graphics/opengl.html:
so official 2.0 support might be a bit off :/
Click to expand...
Click to collapse
Possibly, but it does still support it in the NDK(really, this hardcore graphics stuff should be done in the NDK anyway). Even there it's not really official, but they aren't likely to change the API calls since those are already set in stone by khronos.
Hi Marcus,
to get started, grab the OpenGL ES 2.0 headers from www DOT khronos.org/registry/gles/ and copy the library file from your phone to the NDK installation dir (build/platforms/android-4/arch-arm/usr/lib/). Next you might inspect the libGLESv2.so with objdump to see what functions it provides:
build/prebuilt/linux-x86/arm-eabi-4.2.1/bin/arm-eabi-objdump -t libGLESv2.so
It should have the 2.0 functions like glCompileShader(), glCreateProgram(), etc.
Finally, add the following line to the Android.mk file in the jni/ directory of your Android project:
LOCAL_LDLIBS += -Lbuild/platforms/android-4/arch-arm/usr/lib -lGLESv2
If you're lucky, that should allow you to compile and link OpenGL ES 2.0 code. I cannot try this right now but will as soon as I get my Nexus One on monday
I haven't done any OpenGL ES coding with the NDK, but it should be straightforward if you've written OpenGL (ES) code before. This might be of use: code DOT google.com/p/glesquake/
robert-qfh said:
Hi Marcus,
to get started, grab the OpenGL ES 2.0 headers from www DOT khronos.org/registry/gles/ and copy the library file from your phone to the NDK installation dir (build/platforms/android-4/arch-arm/usr/lib/). Next you might inspect the libGLESv2.so with objdump to see what functions it provides:
build/prebuilt/linux-x86/arm-eabi-4.2.1/bin/arm-eabi-objdump -t libGLESv2.so
It should have the 2.0 functions like glCompileShader(), glCreateProgram(), etc.
Finally, add the following line to the Android.mk file in the jni/ directory of your Android project:
LOCAL_LDLIBS += -Lbuild/platforms/android-4/arch-arm/usr/lib -lGLESv2
If you're lucky, that should allow you to compile and link OpenGL ES 2.0 code. I cannot try this right now but will as soon as I get my Nexus One on monday
I haven't done any OpenGL ES coding with the NDK, but it should be straightforward if you've written OpenGL (ES) code before. This might be of use: code DOT google.com/p/glesquake/
Click to expand...
Click to collapse
Alright! Thanks for the help. I've done a lot of opengl work before and a little bit of opengl es when i had my g1 but haven't ever used the ndk, so that'll get me started.
EDIT: Sweet, I've dumped the list of functions available and it looks like all the appropriate shader functions are there. I'm attaching the full list output from my computer. I actually had to use arm-eabi-strings, since the objs one showed no objects. Regardless, it's looking good on the OpenGL ES2.0 front, and I've already looked into running opengl code from the NDK which is perfectly possible and ok.
ANOTHER EDIT: Haven't quite gotten it to build yet, but I got it to load gl2.h without any complaints. Now I just have a crapload of errors because the sample project I was using(from the ndk samples, san-angeles) was written for OpenGL ES 1.0 and all the things now done in shaders no longer exist(GL_LIGHTING, GL_MATERIAL, etc). Regardless, I'm considering this a success so far, since all that is expected.
YET ANOTHER EDIT: It runs! I'm not displaying anything yet(so it's not really a good test), but I got the shared library to build using OpenGL ES 2.0 and it runs on my phone. Gonna implement a simple program to display a triangle or something just to prove it works and will provide source code/binaries here(also, if anyone has a Droid or knows someone who does, it'd be great if we could test out to make sure this works on the Droid as well)
I just wanted to drop in and say I'm very interested in what y'all are doing I'm of very good at coding. All I know is Java but ill definantly be following yall and keep up the good work
Decided to post a reply, rather than just adding to that one post.
Well, I encountered a fairly large roadblock:
Code:
E/libEGL ( 3366): called unimplemented OpenGL ES API
That's what I see now every time I call one of the functions dealing with ES 2.0. I'm hoping there's another library I can use that'll make that go away, but we might not be as easy as I thought to do this.
That's bad news indeed. I was hoping that everything is in place and Google just didn't release a new NDK with ES 2.0 support yet, but if the libGLESv20.so is merely a stub, we're pretty much out of luck. I'd probably disassemble the file to see if there's actually some code besides "return unimplemented" in there, but even if there was, I'd have no idea on how to continue...
I'm wondering how they render the fancy rain drop effect on the wallpaper. Looks like a perfect fit for a 2.0 fragment shader, however there are a lot of other ways to create that effect.
robert-qfh said:
That's bad news indeed. I was hoping that everything is in place and Google just didn't release a new NDK with ES 2.0 support yet, but if the libGLESv20.so is merely a stub, we're pretty much out of luck. I'd probably disassemble the file to see if there's actually some code besides "return unimplemented" in there, but even if there was, I'd have no idea on how to continue...
I'm wondering how they render the fancy rain drop effect on the wallpaper. Looks like a perfect fit for a 2.0 fragment shader, however there are a lot of other ways to create that effect.
Click to expand...
Click to collapse
Well I managed to view the assembly code, but can't get it into any form that I can/want to read(I know how to read assembly but unless you spend hours with it, it's damn near impossible to decode anything. Plus, I haven't looked at ARM assembly before). Know of a good program to convert it into C?
At any rate, I'll attach the disassembler dump(ran it using arm-eabi-objdump with flags -DS). From looking at it briefly, all the implemented functions look like they might be stubs since they're pretty bare bones and have almost all the same instructions(with a slight modification to one single instruction). But it's hard to tell with assembly. Let me know if you can make anything of it. I had to attach the file in a .zip by the way because it was too big.
SUCCESS!!!! So, it looks like those functions were stubs. Google seems to have done it intentionally for whatever reason. They took the .so that actually worked(libGLESv2_adreno200.so) and shoved it under /system/lib/egl, which the ndk doesn't seem able to access(gives you a runtime error if you linked against it). However, If you just copy that file to /system/lib (yes, this requires root unfortunately) then you can use it. I successfully drew a triangle using shaders .
I'll try to get it to attach that xxx_adreno200.so file to the .apk so it can be used without messing around with such things(and work without root). If I can, then I'll throw it on here so everyone can see. Right now it's just a triangle, but tomorrow: the world.
EDIT: Alright, I attached the .apk(it's in the zip file, xda still doesn't allow posting .apks). I tried to attach the libGLESv2_adreno200.so library to it, so it wouldn't require moving the local one but it just wouldn't accept it. So, at least for the mean time, if you want to actually run that app without having it crash you'll have to do an adb remount and then the following in the terminal(or adb shell) as root:
Code:
cd /system/lib/egl
cp libGLESv2_adreno200.so ../
Once you do that, when you run the app it should display a yellowish triangle on a blue background(it was from the second tutorial from the OpenGL ES 2.0 sdk for PowerVX). Like I said, it's not much right now, but it is using custom shaders to display that triangle.
ANOTHER EDIT: I decided to change the test program a little. All I changed was the fragment and vertex shaders, which I made to change the color of the pixels based on where they are on the triangle. This should show(to those of you who know OpenGL) that it really is using custom shaders, since it's one triangle and it's clearly not using fixed-function pipeline shading .
Awesome work on reverse-engineering this! Keep us posted.
Indeed, keep at it Marcus! Very interested to see how this progresses.
Well done, Marcus! I'm glad you found that working library.
You should be able to embed the library search path in your own library by using the rpath directive while linking your program. See "man ld" for more information. You need to get the NDK to call the compiler like this:
gcc ... -Wl,-rpath=/system/lib/egl
That should allow you to use that library without copying it around, and therefore make it work on non-root phones as well.
I guess all you need to do is add the directive to the LOCAL_LDLIBS variable in Android.mk, or maybe it has LOCAL_LDFLAGS, which would be more appropriate.
robert-qfh said:
Well done, Marcus! I'm glad you found that working library.
You should be able to embed the library search path in your own library by using the rpath directive while linking your program. See "man ld" for more information. You need to get the NDK to call the compiler like this:
gcc ... -Wl,-rpath=/system/lib/egl
That should allow you to use that library without copying it around, and therefore make it work on non-root phones as well.
I guess all you need to do is add the directive to the LOCAL_LDLIBS variable in Android.mk, or maybe it has LOCAL_LDFLAGS, which would be more appropriate.
Click to expand...
Click to collapse
Ya, I tried adding it to LOCAL_LDLIBS, but that just seemed to make it use that path for the local library on my computer when building it. It still failed to find that library on my phone when I ran it. I'll try poking around a little more since that would obviously be ideal.
Alright. Are you sure you used rpath and not rpath-link?
BTW, there's a libGLESv2.so in the 2.1 emulator image. Did you try using that? I wonder if the emulator supports ES 2.0...
robert-qfh said:
Alright. Are you sure you used rpath and not rpath-link?
BTW, there's a libGLESv2.so in the 2.1 emulator image. Did you try using that? I wonder if the emulator supports ES 2.0...
Click to expand...
Click to collapse
I didn't touch either actually, just changed the name of the library and the path it had. I haven't done a lot of make files beyond the most basic operations so a little study might be necessary.
Haven't tried the emulator image one, but the one from the phone just had those stubs. It would be really strange if the emulator had the actual functionality and the phone didn't.
I think you're right that if there's hope then it lies in the makefile, so I'll keep looking into that.
EDIT: Just tried adding --rpath=/system/lib/egl everywhere I could possibly think of and all with no change.
Hmm I can't try this yet, but it looks like it uses the property java.library.path to determine where to look for shared libraries. Maybe I can have it look in /system/lib/egl too?
Ack, tried it, didn't do anything. Still can't find that library.
So ya, I'm giving up on this front for now. Google obviously has some of this ready but doesn't want us using it for now, so I'll just wait for them to give us access unless I get some new info. In the meantime, I'll continue the work I've already started on porting that game from the video I linked to. At least we now have the tools to test this stuff.
[email protected] said:
Hmm I can't try this yet, but it looks like it uses the property java.library.path to determine where to look for shared libraries. Maybe I can have it look in /system/lib/egl too?
Ack, tried it, didn't do anything. Still can't find that library.
So ya, I'm giving up on this front for now. Google obviously has some of this ready but doesn't want us using it for now, so I'll just wait for them to give us access unless I get some new info. In the meantime, I'll continue the work I've already started on porting that game from the video I linked to. At least we now have the tools to test this stuff.
Click to expand...
Click to collapse
thats depressing i was checking this thread like 10 times a day waiting for new info to popup lol call me obsessed but i respect your work
Yet another idea to try. On Linux you can specify the library search path using the environment variable LD_LIBRARY_PATH, e.g. if you run a program like this
LD_LIBRARY_PATH=/some/path /path/to/program
then the linker will search that path for libraries.
Maybe it's possible to set that variable from within the Java code, but before the JNI library is loaded:
static {
// Set environment variable LD_LIBRARY_PATH
System.loadLibrary("your_jni_lib");
}
Finally another idea, so we cannot link our library to the OpenGL ES library. But we could probably dlopen() it from within the JNI library and grab all the function pointers using dlsym(). I will get my Nexus One in a few hours, and ES 2.0 will be one of the first things I'm going to look into
EDIT: Marcus, would you mind posting the source code of your ES 2.0 triangle demo application? Basically all I need is the gl....() stuff. I haven't done too much Shader stuff so far, so that would save me a lot of time.
robert-qfh said:
Yet another idea to try. On Linux you can specify the library search path using the environment variable LD_LIBRARY_PATH, e.g. if you run a program like this
LD_LIBRARY_PATH=/some/path /path/to/program
then the linker will search that path for libraries.
Maybe it's possible to set that variable from within the Java code, but before the JNI library is loaded:
static {
// Set environment variable LD_LIBRARY_PATH
System.loadLibrary("your_jni_lib");
}
Finally another idea, so we cannot link our library to the OpenGL ES library. But we could probably dlopen() it from within the JNI library and grab all the function pointers using dlsym(). I will get my Nexus One in a few hours, and ES 2.0 will be one of the first things I'm going to look into
EDIT: Marcus, would you mind posting the source code of your ES 2.0 triangle demo application? Basically all I need is the gl....() stuff. I haven't done too much Shader stuff so far, so that would save me a lot of time.
Click to expand...
Click to collapse
Sure. I'll post it when I get home from work tonight. I don't have anything proprietary in there yet.
For the setting of the environment variable, from my understanding that's basically what System.SetProperty("java.library.path"... is supposed to do. But it still couldn't find the library and didn't seem to have any effect.
The dlopen bit might work. I was thinking of trying that but haven't had any time. I'm not really too sure on how these shared libraries are used, whether once they're open any other program can find and use them or whether the path to them has to be given explicitly at link time for the program that wants to use them and just generally having one loaded won't help.
EDIT: By the way, @pr0cl1v1ty: Don't worry, I'm not going to stop digging into ES 2.0 entirely. I'm just not going to be pushing as much for getting it to work on non-rooted phones. I've got bigger fish to fry.

[App] B&N eReader

Here's the B&N eReader app that was on my NRG ROM but gave a 'comng soon' splash but updated OTA to the attached new version that is live and working
A bunch of pics and info on the app ar located here: http://www.mobilitydigest.com/barnes-nobles-ereader-is-liveand-sweet/
Awesome, thank you kindly!
Excuse my ignorance about the B&N eReader but can you import ebooks you already own into this reader or will it only except publications from the B&N website?
I am not seeing any option to import existing ebooks, such as the ones I have for eReader. B&N owns eReader, if I remember correctly. Wonder if the two apps will "merge" at some point, or I'm guessing they may want people like me to switch over to the new reader.
this is awesome ... thanks David
I've been waiting for this for a long time. You're my hero! Thanks!
Yer looks ok, downloaded the free books, but I can't view my .epub books I already have, seems pointless application unless I can read my existing epubs, perhaps I am doing something wrong again...
THUDUK said:
Yer looks ok, downloaded the free books, but I can't view my .epub books I already have, seems pointless application unless I can read my existing epubs, perhaps I am doing something wrong again...
Click to expand...
Click to collapse
I suspect they have to be in the folder that the app uses. I haven't dug around yet to find just where the program is storing my books.
After the first five minutes, my initial impressions:
- Visually very appealing
- Instant access to your B&N library (proud nook owner here, so I have a lot of e-books from B&N).
- Doesn't sync yet with the nook (but neither does the BlackBerry or iPhone version)
- You can read e-newspapers from the app (I don't think you can do that yet with the other versions, but maybe they've been updated)
If you buy e-books from B&N this is definitely a must-have app. Otherwise there are more flexible options out there.
I tried importing a book from my peanut press folder on my sd card to the proper one on main memory (where Dracula was downloaded), and it didn't recognize it. I love the fact that the bonehead who made the cab put the BN folder on the root of the device, instead of in program files.
Farmer Ted said:
I tried importing a book from my peanut press folder on my sd card to the proper one on main memory (where Dracula was downloaded), and it didn't recognize it. I love the fact that the bonehead who made the cab put the BN folder on the root of the device, instead of in program files.
Click to expand...
Click to collapse
It's in Program Files on mine. But I'm not happy about the boneheaded move to put the Books folder within the program folder in main memory. It might be preferable to install the app to a storage card instead of main memory. Unless someone can find a way to get the program to look for books on the storage card.
Version 1.0.0.27 is now on B&N's website
images.barnesandnoble.com/PResources/download/WinMo/BNeReader_1.0.0.27.CAB
It's in Program Files on mine. But I'm not happy about the boneheaded move to put the Books folder within the program folder in main memory. It might be preferable to install the app to a storage card instead of main memory. Unless someone can find a way to get the program to look for books on the storage card.
Click to expand...
Click to collapse
I agree. At minimum I want my books on the storage card, even better if the whole program is there too.
If you buy e-books from B&N this is definitely a must-have app. Otherwise there are more flexible options out there.
Click to expand...
Click to collapse
I'm still deciding which reader to go with. Which one do you like better?
Riverplace said:
I agree. At minimum I want my books on the storage card, even better if the whole program is there too.
I'm still deciding which reader to go with. Which one do you like better?
Click to expand...
Click to collapse
After installation I was able to cut and paste the whole installation directory to my Storage Card, update the shortcut and the app worked just fine.
Riverplace said:
I'm still deciding which reader to go with. Which one do you like better?
Click to expand...
Click to collapse
Mobipocket is still my personal favorite.
+1 for Mobireader
It would be nice if they'd update the application to better fit the HD2 (non D-Pad phones)
Download a sample from B&N, anyone will do or the sample of your book you already have..
Then go to your book folder, copy across your, EPUB file already converted from any other form in Calibre etc...then rename it with the exact same long 13 digit number as the one you downloaded...
then ok the image and title are wrong but the book is all correct inside...
Anyone get any further than this
THUDUK said:
Download a sample from B&N, anyone will do or the sample of your book you already have..
Then go to your book folder, copy across your, EPUB file already converted from any other form in Calibre etc...then rename it with the exact same long 13 digit number as the one you downloaded...
then ok the image and title are wrong but the book is all correct inside...
Anyone get any further than this
Click to expand...
Click to collapse
Good tip, infact if you download a sample of the book you have already then everything looks and works fine , the thumbnail has a small sample sticker on it though but that ain't a problem
Rumball: I was able to move it to my storage card as you suggested - thanks.
Mobipocket works ok for me but I have the HD2 and it's hard to turn the pages. I'm still shopping around, I'm taking a closer look at the calibre conversion program.
All,
This app was developed to sync with your B&N ebook library only, ie not to read epub's that you might have already downloaded to your phone or from other sources. If you have a book from B&N then it should be in your ebook library in which case it can be synced and downloaded. That's not to say you can't trick it into reading other downloaded books per other comments.
Also note it's been developed specifically and only for the HD2... mileage will vary if tried on another phones.
Richard
If you buy e-books from B&N this is definitely a must-have app. Otherwise there are more flexible options out there.
Click to expand...
Click to collapse
what would those options be? i have many .pdf's .cbr's i've collected rom around the net. could you guide me in the right direction to one of the better ebook readers for many files types.
thanks

Looking for Developer to...

Hi.
I was wondering how hard it would be to create a simple application that would connect to a server or website checking for updates. I plan on loading font .apk's on the server or website, and would like a application to periodically check for updates or manually check for updates, be able to preview the font, and then download the .apk if wanted. How hard would it be to create such an application?
Thanks.
Jzero88
jzero88 said:
Hi.
I was wondering how hard it would be to create a simple application that would connect to a server or website checking for updates. I plan on loading font .apk's on the server or website, and would like a application to periodically check for updates or manually check for updates, be able to preview the font, and then download the .apk if wanted. How hard would it be to create such an application?
Thanks.
Jzero88
Click to expand...
Click to collapse
Well, this depends on how you approach it, but I think the easiest way to do this would be to create a feed using XML. So if you were doing your font updater, you would load a file like this:
<FontDetails>
<Font name = "Font1" example = "http://www.myfontsite.com/FontExamples/Font1.png" location = ""http://www.myfontsite.com/Fonts/Font1.apk"\>
<Font name = "Font2" example = "http://www.myfontsite.com/FontExamples/Font2.png" location = "http://www.myfontsite.com/Fonts/Font2.apk"\>
</FontDetails>​
The problem with this is that you will have to maintain this XML file, making sure its always up-to-date(Easily manageable with some simple scripts).
If you aren't willing to do this, you could go down the road that is wrongly mislabeled as "The Easy Way" and hard-code the locations of all your APK's and all of your example images, but I would only do this if you were planning on dumping all the APK's and images in the same place(For example, if all your APK's were here: http://www.myfontsite.com/Fonts/). You would request the directory information from the server and parse that into your list of font APK's and correspond them with their example images(probably by naming them the same; i.e. Font1.apk and Font1.png).
If you decide to use the first option, you could do a bunch of cool things with the organization, like break things into categories and apply taggings and it would only require one request to the server per update. If you go with the second method, organization is guaranteed to be a mess if you try anything large scale, and adds a layer of complexity if you try to break things into folders and categories. This would require a ping per folder you have to check, which can have a high complexity factor if you have a lot of folders.
I just want to point out that even though this is directly related to development, this is a type of question that belongs in the General section(Questions ALWAYS belong in General). I'm sure a Mod will come around, scold you, then move the thread.
Anyway, I do hope this helps,
Good luck,
Tyler
Edit: Having a bit of problems getting the XML looking correct. Sorry if it looks ugly :S
Even easier would be to manage the updater as an RSS feed. Then it becomes quite trivial, as there are several examples of RSS readers online already.
Great! Thanks for the reply!
Yeah, the XML approach I think would be the better option as well, just because we could use this thread to hold everything I currently do no have any hosting at this time. Would you be up to making such a application? It seems you have the know abouts to so.... I would be the one to maintain everything and update it. I would monitor this thread and when new ones pop up, I wouldn't mind adding it to in the XML.
Also, how would the RSS feed work?
Thanks
jzero88 said:
Great! Thanks for the reply!
Yeah, the XML approach I think would be the better option as well, just because we could use this thread to hold everything I currently do no have any hosting at this time. Would you be up to making such a application? It seems you have the know abouts to so.... I would be the one to maintain everything and update it. I would monitor this thread and when new ones pop up, I wouldn't mind adding it to in the XML.
Also, how would the RSS feed work?
Thanks
Click to expand...
Click to collapse
Wish I could...I've got about 50 projects already on the back-burner and no time to finish them Tell ya what though...I've finished a mini project a couple weeks ago with some buddies at school for my friends website. Its an Open-Source RSS reader that was made to read in the latest articles of his site. With some slight tweaking, I'm sure you(or some other dev) could mod it to work in your favor...Here's the github address:
http://github.com/pencilo/Absolute-Android-RSS.git
I don't think this is the latest code, but all the working elements you need are in here.

App Runner How To on Nook Tablet: Casio FX-601 Scientific Calculator Java -> APK

App Runner allows Java programs to run on Android. I've tried this with the Nook Tablet 8GB with CM7 Alpha SD card and it works.
Sort of works - if you type too slow or too fast, it'll double or tripe your digit entry. Haven't yet figured out which settings will stop this, but it's something you can work around once you figure out how fast and long you need to press each key for a solid input.
Here's the steps for each Java program you want to run on the Nook.
1) Grab any JAR file.
For this GPL calculator, from here: http://sourceforge.net/projects/uiq3/
2) If it doesn't have a JAD file, run JADMaker. Drag the JAR into this program and you'll get a JAD file.
http://www.softpedia.com/get/Internet/Telephony-SMS-GSM/JADMaker.shtml
There are JAD making websites, but either very slow, won't work right after many tries, or have small file size limitations.
3) Grab both JAD and JAR file and feed it into the APK maker here:
http://www.netmite.com/android/
This site is very, very slow, so expect to sleep a lot waiting.
4) Install the App Runner program on the Nook Tablet from the site above as well.
5) Drop the APK into the Nook, then install it like any app. You can start the App Manger installed in #4 to select the Java program from the list of installed Java apps.
6) For this calculator, set width to 360, height to 640, and set orientation to Portrait. This will allow all the buttons to work right. Lots of other settings to tweak, but generally, it'll run.
---
Since I haven't done any modifications to the source at all, it's GPL and only dropped the JAR/JAD into the APK maker above like any user would, I'm including the APK for the calculator for you to play with and save time as a convenience (asked the op as well - he's ok'd it, too).

[HOWTO] Remove Ads from apk

Hi there, here's a little tweak that I've just figured out and that hopefully some of you might enjoy...
But first off, a disclaimer:
Ads or (upgrade) nag banners 'sometimes' have a justifiable reason of being. Devs might use them to get some extra (very small un fact; most finally give this up in the end) revenue from them. That, in turn, that might allow or encourage them to continue pulishing more free apps for you to enjoy. So use your best judgement here and use these tweaks with discernment...​
Message to moderators: if this goes against xda policy in any way, please let me know and I'll remove all this from here.
OK, now that this is set clear, here's what that is all about:
I'm sure that most of you guys have seen ads (or upgrade) banners in free apps and being an xda member, you probably know a few tricks to get rid of some of them. I mean ads like the ones apps or games that do not really need internet connections can easilly be blocked by using ip-tables rules/firewall/anti-ads apks to completly block their internet (like with Droidwall for example). But what about ads on the apps that DO need internet connection and than cannot be completely blocked? What about the empty screen space left for banners on some others with blocked internet access?
Well, through my readings, I've found that some suggest to hack the apks and to simply decompile them, go in \decompiled_apk\smali\com\google\ folder and delete the "ads" folder altogether. Well, from my experience, this doesn't work very well. In many cases, the modded app will not install and in some other cases, the trick might work for a while and then the ads would eventually come back. That last case just happened to me: a while ago, I've tweaked the DI Radio app like so and things seemed just fine. And today, bam!!: ads banners again. God knows how/why they came back with that "ads" folder deleted, but they did!!
So with a little thinkering and code browsing, I've figured out a very simple way to get this done - here's how:
What you need:
- An apk decompiling/compiling/signing tool(s) of your choice;
- the excellent text editor notepad++ - get it from here
Notes:
- PLEASE, do not fill this thread with questions like: how do I decompile/sign apks? - it's not the place here - thanks!
- And please do not full-quote this long post either
- If you rewrite/repost this somewhere else, please play it fair and give credits/link to this thread.
HOWTO:
1. Pull and decompile your apk;
2. Go in \res\layout folder and select all the xmls files, right-click of the highlighted file and press "open" and they should all open with Notepad++ [just click OK if you get the "confirm 'Open' Action"];
3. Select Search/Find... and enter: "@id/ad" [no quotes ""] and press "Find ALL in All opened Documents" on the search popup dialog box;
4. Now look at the search results and there might be 2 possible (maybe more.. I've tried this on only 2 apks so far...) result types:
--> As a first illustration of this: for the DI radio apk I've mentioned above [I use an older version and not the latest that requires login every time...], you get an xml called "playing.xml" with this at line 6:
Code:
<FrameLayout android:layout_gravity="center" android:id="[COLOR="Red"]@id/ad[/COLOR]_frame" android:layout_width="[COLOR="Red"]320.0dip[/COLOR]" android:layout_height="[COLOR="red"]50.0dip[/COLOR]">
On that line, we can see some size attributes for that banner; just resize them to 0!!;
So all there is to do is to edit it like so:
Code:
<FrameLayout android:layout_gravity="center" android:id="@id/ad_frame" android:layout_width="[COLOR="red"]0.0dip[/COLOR]" android:layout_height="[COLOR="red"]0.0dip[/COLOR]">
-->> Second case: for some other apks (like for an older version of a very famous file explorer..), you might get multiple results (many xmls - 6 or 7 of them) all looking like this:
Code:
<com.google.ads.GoogleAdView android:layout_gravity="center" android:id="[COLOR="red"]@id/ad[/COLOR]view" android:layout_width="wrap_content" android:layout_height="wrap_content" />
So no banner sizes in this case but all there is to do is to delete all those lines completely and then save all the respective xmls. Then,
5. Recompile and sign the apk;
6. Backup [for restoring its data later..] and then uninstall your original apk from your phone (if still there)
7. Install your modded one and enjoy your app without any ads, blank spot or nag screen.
Final notes:
- Now, this doesn't stop the app to get the ads from the internet, but it does give you a simple way to hide them and this also make accidental clicks on them a story of the past...
- This is pure dirty hacking and not a general procedure; there might be different ways to implement ads in apps and ways to hide them; so please try at your own risk and feel free to share your results/tricks with us.
- Thanks to oSandmaNo for reminding me this one important drawback: when you tweak apps like so, you will get an error message when trying to update them on the Playstore. You will have to uninstall them before being able to update. so this mean that make a backup with Titanium Backup (or others) first in order to later restore the app's DATA ONLY. Obviously, the remove ads tweak will then be gone after the update, but since you've done it once, it should be fairly easy to do it once more..
- Read post #3 for a few additional tips.
.
.
Always the best
Move this to android software hacking?
I don't want a Tapatalk sig!
Thanks buddy,
Well after a little more experimenting on this yesterday
[ ...nice way to spend time our last day on Earth... Oh wait! we're still alive; the doomsday that never came...], I realize(like I suspected) that there are many different ads implementation/removal methods and will have to had a few extra tips and tricks here.
I even still have an app that I can't figure out where the ad banner is.
But, if I may just add, the whole point here was to:
1- tell people that notepad++ is excellent tool for multi-open and multiple-files search tool - perfect for xmls...
and 2- make people realize that if ads are displayed on the screen, it is more than likely that there is/are entries about it somewhere in /res/layout/ that can be hacked...
Ok, from phone it's not convenient but here's one or two extra tips:
- search for "<com." and look for results related to google AdView or doubleclick - those can all be voided;
- if you find a line that you know/suspect is a banner, do not completely delete it and just use "<!--" (start - w/o ") and "-->" (end) to void that line;
- if a banner line entry is within a RelativeLayout, it might be preferable to add/change its size to zero with android:layout_width="0.0dip" (same with height) rather than void it;
- if you do the above (0 height/width), and the line has a: android:scaleType=fitXY" entry, delete it from the line. Other wise it might just bypass your change to 0 by 0 size...
- so search for "fitXY" is alao another thing to search for in the goose chase... so is "advert", "banner", "pub", ....
Ok, that's it for now...lack of coffee in the morning makes for messy posts...
So the difference between the results of this procedure and an adblock such as AdAway is? I'm just curious.
KicknGuitar said:
So the difference between the results of this procedure and an adblock such as AdAway is? I'm just curious.
Click to expand...
Click to collapse
they will only block the ads but they keep a blank frame in the display and this will get rid of the whole frame
I don't want a Tapatalk sig!
nogoodusername said:
they will only block the ads but they keep a blank frame in the display and this will get rid of the whole frame
Click to expand...
Click to collapse
Yep, that's the idea!
Why can't I ever come up with those 1-liner answers...?!? :silly:
Baahh! since I've already written an answer in a notepad, I'll paste it here in anyway:
Similarly to anti-virus solution and their virus defintion lists, AdAway is an app that blocks ads through the use of hosts files. It basically downloads and keep updated a list of known ads (and rogue) sites and just blocks any internet connection to them using a local redirection. I've already posted something on all this here.
Btw, I personally do not see the point of using such a specific app just for this as there tons of such lists freely available on the net and I don't think it is that important to update it so frequently... I just update the list once every 3-4 months or so and everything has been fine for me so far...
On the other hand, the object of this thread is to deal with apks' layouts and that means to aim at removing any wasted space that the ads might use OR leave empty if you do block them out. Just look at the 4th screenshot on the OP; it might not be clearly visible because I put some text over it, but you see that black rectangle at the bottom? Well that is what I called an app banner. It's black because I used Droidwall to block internet access to that file explorer, but I believe that it would be the exact same if I would only use either AdAway or just my hosts file. It's the layout design of the apk that still uses that space even though it didn't get any ads from the internet...With my tricks, I (at least the goal is to) regain that important screen real estate no matter what; even without any ad blocking solution... And btw, none of those are perfect either; there will always be one new ad site not listed/included yet...
Like I wrote more than once above, not all apps are coded the same and some other apks do not display anything when they do not get any ads from the net. So these tweaks would not be needed for those.
I feel that what I wrote is a bit confusing, but I hope you get my idea anyway.
Added two more SS as example...
[that freakin app had ads entry in a good dozen different xmls but easy doubleclick ones :victory: ]
Adding
android:visibility="gone"
To any layout block (within < and /> ) having the word "ad" in it should work as well
And right on about notepad++ being great for xmls and I use it along with VTS10 which also previews referenced drawables, strings and public.xml entries in the xml apart from having a complete fuss free environment for reverse engineering apps
Thanx for sharing!
bhupatib said:
Adding
android:visibility="gone"
To any layout block (within < and /> )
Click to expand...
Click to collapse
Thanks I wondered about that; I will try it out on the next app I tweak for this..
having the word "ad" in it should work as well
Click to expand...
Click to collapse
You mean searching for the word "ad" or adding that within the layout? Because searding for "ad" when an app 100+ xmls you will get A LOT of results with "android: paddingLeft=...(/right)"...
And right on about notepad++ being great for xmls and I use it along with VTS10 which also previews referenced drawables, strings and public.xml entries in the xml apart from having a complete fuss free environment for reverse engineering apps
Click to expand...
Click to collapse
Thanks, I'll surely have a look at that VTS10 but when I tried to search for it I got just about every results possible (dry vaccum pumps, metal wires, remote house domotic system, etc...) except something related to Android
Thanx for sharing!
Click to expand...
Click to collapse
NP my pleasure.
Can you update the app after modifying? No package signed incorrectly error?
Sent from my MB526 using xda app-developers app
[] AL [] said:
You mean searching for the word "ad" or adding that within the layout?
Click to expand...
Click to collapse
I didn't mean it literally, just something to identify layouts containing adverts (lame, I know ). There'd be better ways of searching for it (like the id search you mentioned)
[] AL [] said:
Thanks, I'll surely have a look at that VTS10
Click to expand...
Click to collapse
Sorry, I used the abbreviation (and wrong one at that; it's just VTS or Virtuous Ten Studio, formerly M10 Studio) without giving you a link. I should be banned
Here:
http://forum.xda-developers.com/showthread.php?t=1619473
It's really great for themers and smali-ers like you
oSandmaNo said:
Can you update the app after modifying? No package signed incorrectly error?
Click to expand...
Click to collapse
Oh! good that you mention this - I thought about it earlier today then I forgot about it...
You are right: you'll get that error and have to uninstall before beeing able to update.
This makes sense and even if you could, the update would replace the old version and remove your changes anyway.
So yes, this is an important drawback and I'll update the OP tomorrow.
I often tend to keep old versions unless new ones bring important fixes or options...why update what is not broken? hehe!
But at least, once you've found how the tweak is done for a specific app, it should be quite easy to do it again...
And really, I don't know about you, but I do not use that many such apps that show ads or blank space... Most don't if they do not absolutely require internet connection and if you use Droidwall and/or a hosts file.
But again, good point and thanks.
Sweet. Thanks. Works!
Sent from my MB525 using xda app-developers app
Luckypatcher is free and easier to remove ads.
Gesendet von meinem MB526
joke19 said:
Luckypatcher is free and easier to remove ads.
Click to expand...
Click to collapse
Maybe, but that has nothing to do with xda philosophy where the forum is there to make people learn and try mods on there own.
Beside, in my mind, this is pretty much warez talk and that is against xda rules...
So I won't thank you for the suggestion
thanks
cool!
thanking you twice today, mate!
piunti said:
thanking you twice today, mate!
Click to expand...
Click to collapse
Way to go!!!
and you're welcomed.
... Keep going, I have more threads... Hehehe!!
Any comments on why or what you thanked? Anyhow, I thank you here and once more on your post above..: fair enough?
Cheers mæite!
Edit: OK well thanked you there (theme thread) also.
Plz do not full-quote my long posts next time....
Madvertise Ads !!!
Awsome tut dude! I've been on it already but now I've encounter some kind of new ad engine called Madvertise!
Can't seem to get rid of it! Do you or anybody aorund know how?
I seemed to have figured out some of its files...
\res\layout\ad_madvertise.xml
\res\values\attrs.xml
\assets\adview.html
\assets\adview.js
Messing around modifying/removing these files makes the APK file unusable!
Ty very much. I had problems with one app for coding. The ad covred the main sting while I was writing and I really could't see anything. But with ur help I can carry on with my work
P.S.: Does the ad eat traffic even when I can't see it? And I'm enclosing that app. Probably, some1 needs it.
thanks OP for great method
Thanks OP for this great method, i was having problems first when compiling but when i downloaded the latest apktool and aapt especially the decompiling was done with any problem. I removed ads from two apps as a piece of cake.

Categories

Resources