[Q] APK Creation - Barnes & Noble Nook Tablet

Well as many of you know we're over most of the hurdles we needed to jump with the CM7 build for Nook tablet.
Updates for the internal version are simple via CWM, the SD version is not so simple of course.
I'm assuming that it should be possible to built an APK that gains superuser permissions then copies the new files to the system. Can anybody confirm this is possible please?
We need to know that we can tell our SD user that they can update their version just as easy as the internal user
Thanks in advance for your help again everyone!

Well presumably this is how ROM Manager and Metamorph both do their thing, just in a slightly more round about way (as they don't come with the files they need to copy). I'm almost 100% sure this is possible, but I've never tried it personally.
EDIT: Looks like this is how you'd do it: http://developer.android.com/reference/java/io/File.html. Specifically the renameTo() method.

CelticWebSolutions said:
Well as many of you know we're over most of the hurdles we needed to jump with the CM7 build for Nook tablet.
Updates for the internal version are simple via CWM, the SD version is not so simple of course.
I'm assuming that it should be possible to built an APK that gains superuser permissions then copies the new files to the system. Can anybody confirm this is possible please?
We need to know that we can tell our SD user that they can update their version just as easy as the internal user
Thanks in advance for your help again everyone!
Click to expand...
Click to collapse
Well there are about a dozen ways to do this. First of one of the hardest things is comming up with the commands/script. I can defiantly do this. If you want an apk, there are a few guys whom could port my script to an apk. I'm going to make a script here that will format, and create partitions and extract directly from the nook, no need to go through the fancy formatting and such, just go into terminal and run the script. Ill post a prototype for you to have the testers test!

Do you think something like BacksideUpdater inside custom ROM for LG Optimus V?
made by JerryScript
JerryScript i very nice guy, I bet if you ask him, he will let you play with his code
if is it what you looking for

Yes, this is possible. I wrote an app that flashes the recovery partition for my older Froyo phone in the very rudimentary Basic4Android. Copying files under root privileges was part of this process. Fairly easy if you find the right coding examples in whatever your development platform of choice.

xdajunkman said:
Yes, this is possible. I wrote an app that flashes the recovery partition for my older Froyo phone in the very rudimentary Basic4Android. Copying files under root privileges was part of this process. Fairly easy if you find the right coding examples in whatever your development platform of choice.
Click to expand...
Click to collapse
So one of the problems is its not really copying. Its more of an extraction from one place to another. We are required to use dd, and fdisk(for formatting).

GREAT! I was worried updates would be to complicated for people
Sent from my Nook Tablet using xda premium

... and I was worried that I might have to wipe my NT clean again to get the updates. After a week with this wonderful upgrade, I've got a LOT of customization I don't want to lose...

Whoops, wrong button with the thanks. Anyway, it occurs to me you could just have people run a script from a terminal emulator. That would probably be the simplest way to do it. Make an Update folder on the SD card, add it to the PATH by default, and users could just copy over the update files and run the script. Just a thought.

Sycobob said:
Whoops, wrong button with the thanks. Anyway, it occurs to me you could just have people run a script from a terminal emulator. That would probably be the simplest way to do it. Make an Update folder on the SD card, add it to the PATH by default, and users could just copy over the update files and run the script. Just a thought.
Click to expand...
Click to collapse
Has to be simple, something like copy an update.zip onto the SD card then run the apk which will automatically run the update in the zip But my knowledge of such things is limited so I need help there

Same process. With the above method, the user would only have to copy over the file, open a terminal, and type 'update'. With the apk idea you just have to add a little more time for someone to actually write the app (not that it would take too long).

Sycobob said:
Same process. With the above method, the user would only have to copy over the file, open a terminal, and type 'update'. With the apk idea you just have to add a little more time for someone to actually write the app (not that it would take too long).
Click to expand...
Click to collapse
Hmm.... that sounds good.
Anybody know how to actually implement it ?

Dammit, idk why I keep hitting the thanks button thinking it's reply >.>
Anyway, it's just a matter of setting the PATH variable to include /sdcard/Update/ or something similar. To make an actual update, make a folder called Update, fill it with all the files that need to be copied over (probably in a directory structure), and write a script that actually copies everything over. You'll need to make sure sh is in /system/bin (I think it is by default).
You could zip the the files as well, using gunzip (busybox?) to extract them before copying them, then deleting them when you're done, just to keep it cleaner for the user.
The only downside to all this is that I don't know how you would flash a kernel.

Sycobob said:
Dammit, idk why I keep hitting the thanks button thinking it's reply >.>
Click to expand...
Click to collapse
That makes two of us!
Sycobob said:
Anyway, it's just a matter of setting the PATH variable to include /sdcard/Update/ or something similar. To make an actual update, make a folder called Update, fill it with all the files that need to be copied over (probably in a directory structure), and write a script that actually copies everything over. You'll need to make sure sh is in /system/bin (I think it is by default).
You could zip the the files as well, using gunzip (busybox?) to extract them before copying them, then deleting them when you're done, just to keep it cleaner for the user.The only downside to all this is that I don't know how you would flash a kernel.
Click to expand...
Click to collapse
I'm guessing you'd just flash it as usual, surely that one is the easiest? Copying stuff to boot partition would hopefully be just as simple, I was mainly worried about updating system files. I could do with building one for the current update to test the theory!

Related

Fonts: how do i install a font to my phone?

There is a font on another rom that I like, how would I get that installed onto my Eris? I have the file from the other rom.
Have a look at T2noob's batch file font installer for ideas (and fonts, too).
Looks like he takes a pair of True Type (.ttf) files - one regular face, one bold face - and copies them to
/system/fonts/
renaming the (respective) .ttf files to "DroidSans.ttf" and "DroidSans-Bold.ttf"
Then, just reboot.
That was done for rooted 2.1 ROMs; I'm not sure if it the same for AOSP or CM6 Froyo ROMs
good luck
bftb0
bftb0 said:
Have a look at T2noob's batch file font installer for ideas (and fonts, too).
Looks like he takes a pair of True Type (.ttf) files - one regular face, one bold face - and copies them to
/system/fonts/
renaming the (respective) .ttf files to "DroidSans.ttf" and "DroidSans-Bold.ttf"
Then, just reboot.
That was done for rooted 2.1 ROMs; I'm not sure if it the same for AOSP or CM6 Froyo ROMs
good luck
bftb0
Click to expand...
Click to collapse
Thank you so much, this helps. I posted a question to his thread on the other site, but is it possible, since the fonts are in "true type" format that I can use some of mine?
johnny quest said:
Thank you so much, this helps. I posted a question to his thread on the other site, but is it possible, since the fonts are in "true type" format that I can use some of mine?
Click to expand...
Click to collapse
The best way to find out is to try.
Just make a Nandroid backup before you start, and then there is zero risk involved in trying.
bftb0
bftb0 said:
The best way to find out is to try.
Just make a Nandroid backup before you start, and then there is zero risk involved in trying.
bftb0
Click to expand...
Click to collapse
Ok, thanks I will give it a try.
johnny quest said:
Ok, thanks I will give it a try.
Click to expand...
Click to collapse
I used the T2Noobat but it says Device not found but when I go to the folder where my font is, its not there. So I don't know if I have to reboot my phone in order for my font to take effect. Or, the way you said about system/fonts..... I don't know where in my sd would I find the fonts in order to change it.
johnny quest said:
I used the T2Noobat but it says Device not found but when I go to the folder where my font is, its not there. So I don't know if I have to reboot my phone in order for my font to take effect. Or, the way you said about system/fonts..... I don't know where in my sd would I find the fonts in order to change it.
Click to expand...
Click to collapse
If you get errors, it is not reasonable to conclude that the install worked despite the errors. That's what error messages are for - to tell you that something went wrong.
T2noobs .bat file (script) presumes that you have:
1) ADB working on your PC (generally by installing the Android SDK or HTC Sync + adb)
2) That your phone is connected via USB cable
3) That your phone has USB Debugging turned on
4) That your phone is running a rooted ROM.
You don't have to use his script. I mentioned it as an example. You can just use a root-aware file manager (RootExplorer or Estrongs File Manager), and re-mount /system in RW mode, and then drop your two True Type fonts into
/system/fonts/
with the file names "DroidSans.ttf" and "DroidSans-Bold.ttf"
and then reboot. Obviously, there will already be files in there with those names to begin with, so you need to either (a) rename them to something else, (b) move them to some other folder, or (c) delete them.
I don't know how to make this any clearer.
You probably should spend some time learning how to perform Nandroid backups and restores before you do any of this (if you have not already mastered those skills). Having good backups will save your butt.
bftb0
PS. I just did this on my (CELB 3.2) ROM, so I know it works - assuming you are not using some screwy fonts.
bftb0 said:
If you get errors, it is not reasonable to conclude that the install worked despite the errors. That's what error messages are for - to tell you that something went wrong.
T2noobs .bat file (script) presumes that you have:
1) ADB working on your PC (generally by installing the Android SDK or HTC Sync + adb)
2) That your phone is connected via USB cable
3) That your phone has USB Debugging turned on
4) That your phone is running a rooted ROM.
You don't have to use his script. I mentioned it as an example. You can just use a root-aware file manager (RootExplorer or Estrongs File Manager), and re-mount /system in RW mode, and then drop your two True Type fonts into
/system/fonts/
with the file names "DroidSans.ttf" and "DroidSans-Bold.ttf"
and then reboot. Obviously, there will already be files in there with those names to begin with, so you need to either (a) rename them to something else, (b) move them to some other folder, or (c) delete them.
I don't know how to make this any clearer.
You probably should spend some time learning how to perform Nandroid backups and restores before you do any of this (if you have not already mastered those skills). Having good backups will save your butt.
bftb0
PS. I just did this on my (CELB 3.2) ROM, so I know it works - assuming you are not using some screwy fonts.
Click to expand...
Click to collapse
Thank you so much, I've been living on backups and restores. believe me I've learned my lesson. I will give this a try.
Your method worked great with the Root Manager. I bought it on the market. Ok, my biggest problem now is that my font is microscopic small. I don't know why. But I can't see the letters of which folder I'm in to take that font out.
I need a favor: can you post up screenshots or the number of folders to scroll down to get to the system/fonts/droidsans.tff
I can't see it, really its that small its the universal acc font.
Never mind I got it. Took a lot of squinting but I got it. Thanks.

Avatar.apk Movie App for Froyo that works with DRM'd Copy

This Avatar.apk is for those who have upgraded to Froyo with an unofficial build that doesn't include a working Avatar app, but desire a working Avatar.apk that launches the DRM protected copy of the movie included with the phone.
Some caveats/disclaimers: I don't own a Vibrant; I have an i9000 Galaxy S and a Nexus One. I don't plan on providing much support for this, but it shouldn't need it. All the usual "I am not responsible for damage to your phone" disclaimers apply; if you don't know how to use adb and don't have root, go find out how in the appropriate FAQs.
Back story: My friend owns a Vibrant and hated it (slow/laggy). I thought upgrading it to a Froyo build would make him happy, so I did with Team Whiskey's Onyx version (very slick, better than the best ROM I have on i9000 IMHO). He was disappointed that the Avatar shortcut/app on the desktop disappeared, so I pulled the apk from a 2.1 build and pushed it to the phone, but it didn't work.
A little investigation showed that the apk file has an xml resource that is hard-coded to look for the encrypted/drm copy of the movie in the path "/sdcard/sd/movie/AVATAR.dcf", but the Froyo builds mount the external card as "/sdcard/external_sd/" so the app doesn't work.
All I did here was edit the xml file to the correct path, repacked the apk, signed it, pushed it to the phone with adb to /system/app. The apk was then available to add as a desktop shortcut again, and it opens the movie as expected.
The file won't install like a regular apk (at least it wouldn't for me), it must be pushed to /system/app to work - use this command:
adb push <your path>/Avatar.apk /system/app
You could also probably download the apk and copy it over to /system/app with Root Explorer or any other file manager that lets you write to /system/app.
I have only tested this with Team Whiskey's Onyx build and by pushing via adb. I can't test any other ROM since I don't own a Vibrant.
I know a lot of people consider the Avatar.apk to be bloatware and ask how to remove it, but I see a lot of people asking for it back because it's convenient and a great show-off feature on the phone for non-Galaxy S owners.
Additional disclaimers: I did quite a bit of searching here on XDA for an apk that took this approach and didn't find one. If it's already out there, I apologize for this post and can link to it. All I found was an apk that requires you to have a non-encrypted mp4 copy of the movie. I also found a lot of bad information about you could use the original 2.1 version if you just de-odexed it and other stuff like that. Again, this will ONLY work on a 2.2 Froyo ROM because of the change in mounting path of the external sdcard.
credit/thanks to Brut.all for his apktool and to jessetbenton for his Mac-friendly android auto signing applet.
Edit: I only modded the English language part of the apk, it may not work properly if you're using a different language.
Here's the apk, enjoy:
Wow, that first post is a lot of words for such a simple posted apk! LOL. I just wanted to make sure to cover all the bases for any criticisms I might be getting.
Thanks dude, I kept trying to install the old avatar.apk, and when I tried opening avatar, it kept giving me "file not found"
Oh, btw works on Eugene's Macnut R12
You could also just make a folder named "sd" on the sd card, and move the Movie folder there. Works just fine for me.
pablizzo said:
You could also just make a folder named "sd" on the sd card, and move the Movie folder there. Works just fine for me.
Click to expand...
Click to collapse
Yes, but then you lose that 1gb of space on your internal sdcard.
I'd have gone for a symlink approach instead, but the internal card is plain old FAT32 and doesn't support them.
Or just use the stock froyo Avatar.apk? Lol. Worked for me...
distortedloop said:
Yes, but then you lose that 1gb of space on your internal sdcard.
I'd have gone for a symlink approach instead, but the internal card is plain old FAT32 and doesn't support them.
Click to expand...
Click to collapse
1 out of ~13gb is fine with me
rk0 said:
Or just use the stock froyo Avatar.apk? Lol. Worked for me...
Click to expand...
Click to collapse
Ah, that's good. Where'd you get it? I thought there wasn't a Vibrant specific Froyo yet - all I see on samfirmware.com are 2.1 builds. Like I said, I'm not a Vibrant owner, so don't really keep up with its developments.
Thanks for posting that.
pablizzo said:
1 out of ~13gb is fine with me
Click to expand...
Click to collapse
Yeah, to each his own.
My internal 16gb on the i9000 is almost full (nandroid backups, media, etc), and I have an external 16gb that's more than half full. I prefer to keep large media files on the external, obviously YMMV.
Glad you had a solution that works for you.
Nice thanks
Been looking all over this...thanks
Sent from my XDA app cuz I'm stalking your mom....
distortedloop said:
Ah, that's good. Where'd you get it? I thought there wasn't a Vibrant specific Froyo yet - all I see on samfirmware.com are 2.1 builds. Like I said, I'm not a Vibrant owner, so don't really keep up with its developments.
Thanks for posting that.
Click to expand...
Click to collapse
Deodexed JK2 Rom.
rk0 said:
Deodexed JK2 Rom.
Click to expand...
Click to collapse
Thanks for the response.
I wish someone had answered any one of the dozens of posts I read where people were complaining or asking about this with that info. Would have saved me the trouble here.
Actually, it worked out well for me anyways. I have a couple of apps with the same problem where I really want to force them to use the external card instead of the internal. Now I've learned an approach I can use to "fix" or mod those apps. I wish app developers would let you specify a preferred working directory - hard coded paths aren't usually a good idea in my opinion.
At any rate, based on the number of views of the thread, and over 140 downloads between my version and yours, seems like a lot of people didn't know about this, and we've given them a working solution. That's a good thing in my opinion.
can u make this work from terminal?
Please help me to get Avatar working !
Iam on Darky's 10.2 ROM(GB 2.3.4), bullet kernel & KB5 modem.
and the movie is at the same folder structure since, my phone came stock.
I tried:
1.) I cleared drm content and drm protected content & restarted my phone two times- then downloaded the app from http://forum.xda-developers.com/showthread.php?t=774078 but it won't install.
2.) I used the Android customisation suite from http://forum.xda-developers.com/showthread.php?t=894794 and created a zip with just the avatar.apk , cleaned dalvik cache, and the installed the zip from CWM, still the application just clicked, but no response/error message whatsoever.
3.) I downloaded a terminal emulator & tried to push the apk from this thread and I get adb:not found.
Please guide me, what needs to be done, as I haven't seen the movie [email protected]!
Great work I know this has been a huge issue for many many people ...I no longer have avatar on my phone but I sure missed the launcher at one time back when I first flashed my phone
Shortbus-Driver said:
Great work I know this has been a huge issue for many many people ...I no longer have avatar on my phone but I sure missed the launcher at one time back when I first flashed my phone
Click to expand...
Click to collapse
Buddy, I haven't been able to get it working, thru any of these methods!
I guess, I might have been doing something wrong in ADB Push. But I even tried with a Root File Explorer and replacing the Default Application that i had flashed using zip generated by Android Customization Tool(ACS) , with one provided in the two links(one of them, gives application not installed,probably the bigger in size one, and so installed the other one, thereby replacing the default that I talked above). but for no good.
Avatar, still doesn't work. Please help, guys!!

[Solved][Q] .apk file questions

Hi everyone! I'm still relatively new to all these customizations that can be made on these phones, and I am curious about all these .apk files I keep seeing around. Everyone time one is posted, it says to push it to your phone to replace whatever file is there... The thing is, every time I read about it I find a new way of doing it. Some say to use root explorer, some say SGS tools app, some say to use easy installer, and I think I've even read to use ADB? I just was wondering what's the best method? Easiest method? Can you screw your phone up by replacing these files? I keep reading things like if you want to switch a camera in your ROM to a different version, just install the .apk! Or, if you want to use live wallpapers in a ROM that doesn't come with it, here is the .apk for that!
Any help is much appreciated!
Thanks guys!
tarastaryo said:
Hi everyone! I'm still relatively new to all these customizations that can be made on these phones, and I am curious about all these .apk files I keep seeing around. Everyone time one is posted, it says to push it to your phone to replace whatever file is there... The thing is, every time I read about it I find a new way of doing it. Some say to use root explorer, some say SGS tools app, some say to use easy installer, and I think I've even read to use ADB? I just was wondering what's the best method? Easiest method? Can you screw your phone up by replacing these files? I keep reading things like if you want to switch a camera in your ROM to a different version, just install the .apk! Or, if you want to use live wallpapers in a ROM that doesn't come with it, here is the .apk for that!
Any help is much appreciated!
Thanks guys!
Click to expand...
Click to collapse
You CAN screw your phone up if you do it to the wrong APK (like /system/framework/framework-res.apk, if you install a bad one, your phone won't boot, but there is an easy fix, nandroid!).
Basically all the methods do the same thing. In Android "Installing" an app is as easy as moving it to the correct location. All of these methods do just that.
The easiest way IS to probably use Root Explorer because you can rename the old one just in case, and it will handle the system read/write mounting for you. Plus GUIs are always easier.
So here's how it works: user apps go in /data/app, and system apps go in/system/app. User apps can't really mess anything up, but be careful with System ones. Live wallpapers, things of that nature usually don't hurt. Camera is ok to mess around with, too.
Edit: my ramblings are probably confusing, don't hesitate to ask me to clear something up
usually most apk files can be installed easily by transferring the file to the root of your internal sd card then go to MY FILES locate the apk file and click on it and it will ask you to install. Thats it. You can also root explorer and just place it in the system/app folder then reboot. I install all of my apks through the first way I mentioned. On my wife's Mytouch4g there is no my files so use Astro file manager. Come to think of it any file manager from the market will do. Good luck...
tarastaryo said:
Hi everyone! I'm still relatively new to all these customizations that can be made on these phones, and I am curious about all these .apk files I keep seeing around. Everyone time one is posted, it says to push it to your phone to replace whatever file is there... The thing is, every time I read about it I find a new way of doing it. Some say to use root explorer, some say SGS tools app, some say to use easy installer, and I think I've even read to use ADB? I just was wondering what's the best method? Easiest method? Can you screw your phone up by replacing these files? I keep reading things like if you want to switch a camera in your ROM to a different version, just install the .apk! Or, if you want to use live wallpapers in a ROM that doesn't come with it, here is the .apk for that!
Any help is much appreciated!
Thanks guys!
Click to expand...
Click to collapse
An apk is a specialized application file used by android (uses the same file headers as .zip files).
You are correct that there are various methods to push or move apk's to appropriate directories with in the phone. now as to which is easier or best, all methods work about the same, though there are minute differences.
If you want to move apk's into a certain directory while using a phone i find it easiest to use a file manager like root explorer that has root permissions to move apks around. keep in mind that when moving system files most often you will have to reboot for the changes to take effect with out bugs.
If instead you want to use a computer personally i find ADB to be the easiest. After installing the android sdk you will have to navigate into the android sdk directory then to the platform-tools directory within the android sdk folder. then in command prompt type " adb push <directory of file on your computer> /<directory of where you want it on your phone> hit enter and all is gravy. keep in mind that pushing/moving files to your phone using adb works the best when in recovery mode.
as to which of these operations is the best is a personal decision personally i like to use adb to move around system files and root explorer for applications.
hope this helps
Thanks guys!! Ok, so just to be sure. I'm currently running the Malice rom, and somewhere in the threads is the LiveWallpaperPicker.apk
So all I have to do is download this, place it on the root of my internal SD card, go into file manager and find it, click on it, and it will ask me to install it? It's really that easy??
Or, should I download root explorer and copy and paste it to a specific place?
tarastaryo said:
Thanks guys!! Ok, so just to be sure. I'm currently running the Malice rom, and somewhere in the threads is the LiveWallpaperPicker.apk
So all I have to do is download this, place it on the root of my internal SD card, go into file manager and find it, click on it, and it will ask me to install it? It's really that easy??
Or, should I download root explorer and copy and paste it to a specific place?
Click to expand...
Click to collapse
For that file you will need to place it in /system/app (it can't be installed normally because it's a system app). So you need something like Root Explorer
I think EStrongs File explorer is a decent free alternative, but when I tried it a couple months ago I had no luck with it so I just bought Root Explorer (good investment)
The guide in my signature touches on this, but BT has you covered. I am also a huge advocate of Root Explorer.
Just take the .apk, move it to system/apps and I reboot, but it may not be necessary... no need to click on it and select install, as BT referenced.
Thanks so much everyone! Just purchased root explorer and will try this out.
IT WORKED IT WORKED IT WORKED!!!!!!!!!!!!!!!!!!!!
After I rebooted, none of my widgets could load, but I have live wallpapers again! I love learning new stuff! Thanks sooooooooooooooooo much! You guys are the BEST!!!
Odd about the widgets. Were you able to just remove them and re-add them back?
Yep, just deleted them off my home screen and added them back again. All of them had errors saying widget could not load

Enable Copy & Paste on the Nook Tablet

Enable Copy & Paste on the Nook Tablet​
Background
The lack of copy & paste functionality on the Nook Tablet is one of the most annoying "features" of the B&N firmware and it affects not just geeks like me but also the average user. This thread and this thread are two of many, many threads complaining about the missing copy & paste. This thread proposes a "fix" by combining the Hacker's Keyboard and Swype, but is still really lame.
The method I will describe here solves the problem by replacing /system/framework/framework.jar which contains the code for Android widgets like text fields. I have merged into the stock /syste/framework/framework.jar the code responsible for copy & paste from the Android source code.
Instructions
Video walkthrough: http://www.youtube.com/watch?v=7V70a3FYbt4
0. Before you proceed, know that THIS IS EXPERIMENTAL SOFTWARE THAT PROBABLY VOIDS YOUR WARRANTY AND MAY PERMANENTLY OR TEMPORARILY BRICK YOUR TABLET. Even though it worked for me, it may not work for you, and worse, it is quite possible that it could cause your tablet to boot-loop or die. I AM NOT RESPONSIBLE FOR ANY POSSIBLE DAMAGES TO YOUR TABLET / ANYTHING ELSE CAUSED BY THIS METHOD. BY USING IT YOU AGREE TO ASSUME ALL RESPONSIBILITY FOR YOUR ACTIONS.
1. Your tablet needs to be rooted for this to work. If you have not rooted it yet, search this forum for instructions.
2. Since we will be copying files to /system, you will need to install ES File Explorer or Root Explorer or whatever other app that allows you to do that.
3. Download the file that corresponds to your OS version from below:
1.4.2 (16GB/8GB): http://www.mediafire.com/?5pf2aegq02194lq MD5: ef35d35daffd0d9574f48a43ccc4b58c​1.4.0 (16GB): http://www.mediafire.com/?es6gd31wzr7yk8a MD5: 99d2e7eff173fbdc77c79b4f4a6ff53c
The 1.4.0 version has been reported to cause boot loops for some people, while it has worked for others. You have been warned.​If you're on a different OS version, post the file /system/framework/framework.jar form your tablet and I will make a package for it.
4. Extract file contents to microSD card, and insert microSD card into the tablet.
5. Using ES File Explorer / Root Explorer, copy the extracted file framework.jar.new to the directory /system/framework/. (If you're using ES File Explorer, make sure "Up to Root", "Root Explorer", and "Mount File System" are checked in settings.)
6. Copy the extracted file uim-sysfs to /system/bin/.
7. Go to /system/bin/, and change the permissions of the file uim-sysfs to executable. (If using ES File Explorer, long press -> Properties -> Change -> Check everything under "execute".)
8. Power off tablet and power on again. The tablet should take much longer to boot this time than normally, so no need to worry. When the tablet boots up, you will most likely see lots of force close dialogs. This is normal.
9. Wait one minute. You could be stuck in a boot loop if you don't wait.
10. Power off tablet and power on yet again. This time it should also take much longer to boot; the boot times will return to normal after several reboots.
11. Profit.
Force close issues
The first time you run some (read most) apps after applying this hack would likely result in force closes. While annoying, there is no way to get around it due to how the Dalvik VM caches references to /system/framework/framework.jar. In addition, every time you install new apps or update apps, you will have to reboot the machine before those apps are usable; you will get a force close when you try to use those apps until you reboot.
The solution is simply to reboot your tablet each time you get a force close error from an app that worked fine before this hack. The force close error for that particular app should go away following a reboot. If you get a force close from another app after that, just reboot again.
How it works
The information below is for people interested in understanding how this stuff works. If you just wanted to enable copy and paste on your tablet, you can stop reading.
This hack is based on the exploit explained at http://forum.xda-developers.com/showthread.php?t=1534518. The uim-sysfs script in the attached file saves the stock /system/framework/framework.jar, copies over my modified framework.jar.new, and restarts the zygote process. After the zygote process has loaded my framework.jar.new, the uim-sysfs script restores the stock /system/framework/framework.jar so that /init will not bail on the next boot.
To enable copy & paste in /system/framework/framework.jar, I decompiled the stock implementation and merged in related code from AOSP. The two classes I changed are android.widget.TextView and android.widget.EditText. For android.widget.EditText, I simply used the AOSP implementation because the only difference between the two was in the enabling of copy & paste. I manually merged android.widget.TextView because there appears to be B&N enhancements in it in addition to disabling copy & paste.
The exact steps I took as well as a diff of my modifications are documented in post #12.
Disclaimer
Again, this is experimental software. That it worked for me does not mean it will work for you, or that it won't brick your tablet. I am not responsible for any possible damages resulting from using this method.
Here i post framework.jar from stock 1.4.0 rooted
~ Veronica
lavero.burgos said:
Here i post framework.jar from stock 1.4.0 rooted
Click to expand...
Click to collapse
OK. Looks like the framework.jar from 1.4.0 is different from 1.4.2; I've merged in the same changes. If you're feeling brave, the package I've made for 1.4.0 is here.
MD5: 99d2e7eff173fbdc77c79b4f4a6ff53c
Can you confirm whether this works?
16gb Nootlet with 1.4.0 rom, rooted, OTA blocked yada yada.
Stayed at the "read forever" screen almost forever, then finally started up. Fellow victims take note, it isn't dead so be patient.
Lots of FC, the last persistent one was the launcher (ADW ipaidforthis version)
Powered off and on again after waiting way longer than 1 minute.
Second boot forever at "read forever" screen so far.
If it comes back to life I'll try the 1.4.0 version & let you know.
[Edited to add}
... time passes ...
Any way out of the "ADWLauncherEX" force-close loop? Does Android have a "safe mode" boot option like Windows? (sorry)
No, I haven't installed CWM recovery yet. Remind me to do that if this thing ever gets over its mental breakdown.
jichuan89 said:
OK. Looks like the framework.jar from 1.4.0 is different from 1.4.2; I've merged in the same changes. If you're feeling brave, the package I've made for 1.4.0 is here.
MD5: 99d2e7eff173fbdc77c79b4f4a6ff53c
Can you confirm whether this works?
Click to expand...
Click to collapse
Thanks can't test right now 'cause im finishing another project and then i have to test the tun.ko module for CM9 busy bee .
~ Veronica
cellhead said:
Stayed at the "read forever" screen almost forever, then finally started up. Fellow victims take note, it isn't dead so be patient.
...
Second boot forever at "read forever" screen so far.
Click to expand...
Click to collapse
Thanks for mentioning this. Will add to instructions.
cellhead said:
Any way out of the "ADWLauncherEX" force-close loop?
Click to expand...
Click to collapse
Getting FC's is normal - as the instructions state you probably have to reboot a number of times before all FC's disappear. Any luck so far? If not, please let me know and I will post a recovery SD card image that will allow you to undo this hack.
Also - as I said clearly in the instructions (Compatibility section), before you try this out on your 16GB, you should post your /system/framework/framework.jar so I can verify that this works on the 16GB. I don't have the 16GB tablet so I don't know if this works on it at all. Anyone?
Thanks. You may want to feature the version info prominently in the OP. I got my issue solved in a roundabout way when it finally went into a boot loop and triggered the factory reset. That got me back to 1.4.0 unrooted, and without the FC problems. Reran indirect's rooting script and I'm back to some semblance of normality.
Ain't complaining, I took on the risk of trying your copy/paste fix and went on an unplanned adventure. Such is life as a RL software tester ;-)
I'll wait and see how things shake out. You're onto something good here, so once it's a little safer for the normals to apply it, I'll give another go.
For the record, 16g Nook tablet, rooted via indirect, OTA blocked, v1.4.0
cellhead said:
You may want to feature the version info prominently in the OP.
Click to expand...
Click to collapse
You're right...really sorry about that.
On the other hand, did you try the files in the original post, or did you use the files for 1.4.0 I posted in the 3rd post?
The ones in the original post. Then I read the third post, but was unable to get it to boot far enough that I could replace the files and try again.
Sent from my BNTV250 using xda premium
cellhead said:
The ones in the original post. Then I read the third post, but was unable to get it to boot far enough that I could replace the files and try again.
Click to expand...
Click to collapse
The files in the original post are modified from 1.4.2 and would most certainly not have worked on 1.4.0...I should have made that clearer. Sorry.
The files in the 3rd post though are modified from 1.4.0 (thanks to lavero.burgos) and should work for you. Any chance you could test them out?
--- EDIT ---
Also - I've made a bootable SD card that will remove this hack and fix the tablet even if something goes wrong and you cannot boot into the system to remove the files directly. I can post it if someone needs it.
Cool hack, but why all these doubts and asks for 16gb's framework.jar ? What users have on devices comes from vendor firmware package(s), and you can see at http://www.barnesandnoble.com/u/Software-Updates-NOOK-Tablet/379003187/ that there's no separate versions for 8gb vs 16gb. That page (and pages for other releases) should be also the authoritative place for getting framework.jar .
On the related note, would you care to provide exact instructions how to make framework.jar with c&p functionality? That would help to keep it updated across vendor upgrades, and also for making sure that new framework.jar contains only changes related to c&p and nothing else ;-). Granted, such instructions would be long and boring, so writing them in the shell script language rather than English would be a good idea ;-).
pfalcon said:
Cool hack, but why all these doubts and asks for 16gb's framework.jar ? What users have on devices comes from vendor firmware package(s), and you can see at http://www.barnesandnoble.com/u/Software-Updates-NOOK-Tablet/379003187/ that there's no separate versions for 8gb vs 16gb. That page (and pages for other releases) should be also the authoritative place for getting framework.jar .
Click to expand...
Click to collapse
Thanks for the link! I went and downloaded the update archive and extracted it, and can confirm that the /system/framework/framework.jar in that archive (which I'd assume is the same as on the NT 16GB/1.4.2) is different from the same file on my NT 8GB/1.4.2., which confirms my hypothesis in posts #11 and #14 in http://forum.xda-developers.com/showthread.php?t=1517513&page=2. The bizarre thing is that if you unzip the files they produce the exact same content; it looks like they differ only in some sort of signature. But this means that my framework.jar will work on both the 8GB and 16GB on 1.4.2. So thanks again for the link!
pfalcon said:
On the related note, would you care to provide exact instructions how to make framework.jar with c&p functionality? That would help to keep it updated across vendor upgrades, and also for making sure that new framework.jar contains only changes related to c&p and nothing else ;-). Granted, such instructions would be long and boring, so writing them in the shell script language rather than English would be a good idea ;-).
Click to expand...
Click to collapse
What I did was this. You need zip, unzip and a tool called apktool. I'm assuming the framework.jar from the Nook is called ~/framework.jar.nook and the framework.jar from vanilla Android (AOSP) is ~/framework.jar.aosp.
1. Extract framework.jar into a directory z:
Code:
$ unzip framework.jar -d z
2. Use apktool to disassemble framework.jar.nook:
Code:
$ apktool d ~/framework.jar.nook
3. Disassemble framework.jar from AOSP.
Code:
$ apktool d ~/framework.jar.aosp
4. Compare and modify framework.jar.nook.out/smali/android/widget/{TextView,EditText}.smali against framework.jar.aosp.out/smali/android/widget/{TextView,EditText}.smali. My diff file can be downloaded here. Apply diff with
Code:
$ cd framework.jar.nook.out; patch -Np1 < jichuan89_nook_text_hack.diff; cd ..
5. Recompile Nook's framework.jar:
Code:
$ apktool b framework.jar.nook.out
6. Repackage modified Nook's framework.jar into ~/framework.jar.new
Code:
$ cp framework.jar.nook.out/build/apk/classes.dex z/classes.dex
$ cd z; zip -r ~/framework.jar.new META-INF classes.dex preloaded-classes; cd ..
framework.jar in that archive (which I'd assume is the same as on the NT 16GB/1.4.2) is different from the same file on my NT 8GB/1.4.2
Click to expand...
Click to collapse
I just tried to compare framework.jar I have on my device after 1.4.2 OTA update vs downloaded from B&N site - they turned out to be the same, md5sum is 795ae49e2b05b05c999a424a7d84b36b. Anyway, good news that contents were the same in your case too. It might be that 8Gb's initial in-flash 1.4.2 indeed was packaged differently than 16Gb's 1.4.2 update (that's idea somehow backed by the fact that 16Gb's initial in-flash 1.4.0 is not available on B&N site). Again, good to know that actual contents are the same, so 1.4.3 would be common either (which makes full sense, otherwise B&N just makes it harder on themselves).
What I did was this.
Click to expand...
Click to collapse
Thanks for the instructions and the diff! I with that all hacks posted on the forum came in such form ;-)
pfalcon said:
I just tried to compare framework.jar I have on my device after 1.4.2 OTA update vs downloaded from B&N site - they turned out to be the same, md5sum is 795ae49e2b05b05c999a424a7d84b36b.
Click to expand...
Click to collapse
Nice - thanks for confirming this. That's really helpful to know.
pfalcon said:
It might be that 8Gb's initial in-flash 1.4.2 indeed was packaged differently than 16Gb's 1.4.2 update (that's idea somehow backed by the fact that 16Gb's initial in-flash 1.4.0 is not available on B&N site). Again, good to know that actual contents are the same, so 1.4.3 would be common either (which makes full sense, otherwise B&N just makes it harder on themselves).
Click to expand...
Click to collapse
Right - it would make economic sense for B&N to make the software on the two tablet models to be as close as possible. I do hope they'll make their and our lives easier by just using the same version of the same damn files in the next update for the two models, as you said.
Sent from my Nook Tablet using XDA
I can make CWM flashable zip with original framework.jar for the ones having troubles until is fully tested. Tomorrow i'll jump back to stock 1.4.0 to test this hack and report back.
~ Veronica
A flashable zip would be cool if for no other reason than simplicity and reduced panic on the part of newcomers and when re-flashing the stock ROM.
I'm going to try this, so with me luck, but first: Do I need to boot into CWM to do this?
CRE said:
A flashable zip would be cool if for no other reason than simplicity and reduced panic on the part of newcomers and when re-flashing the stock ROM.
I'm going to try this, so with me luck, but first: Do I need to boot into CWM to do this?
Click to expand...
Click to collapse
No - this is for the stock firmware. CWM should have copy & paste already because it doesn't use B & N's framework.jar.
CWM as in ClockWorkMod not CM7 as in CyanogenMod v7.
EDIT:
To clarify, I didn't know if I could do this while the NT was booted normally or if I needed to boot with ClockWorkMod to ensure that the OS didn't try to access that file.
CRE said:
CWM as in ClockWorkMod not CM7 as in CyanogenMod v7.
EDIT:
To clarify, I didn't know if I could do this while the NT was booted normally or if I needed to boot with ClockWorkMod to ensure that the OS didn't try to access that file.
Click to expand...
Click to collapse
No. If there were requirements I would have put them in the instructions. It doesn't matter how you boot.
Sent from my Nook Tablet using XDA
Thank you. I guess I'll repartition first then get this out of the way too.

Working with backups.

Ok, this may be answered elsewhere, I don't know. "Search is temporarily unavailable" I am trying to understand how I am supposed to work with the backup from CWM. I understand that I should have a System image that I can work in, but what I have is 3 files in its place. System.ext4.tar, System.ext4.tar.a, and System.ext4.tar.b. All three files are broken to some degree.
System.ext4.tar is a zero byte file.
System.ext4.tar.a appears to be a spanned tar file that 7ZIP/WinRAR simply think was cut-off (never asks for the second file, and complains of unexpected End of Archive)
System.ext.4.tar.b appears to be the second part of the archive, but nothing will open it.
So, how do I get to a point I have a complete archive that I can edit? Or do I need to use different software than CWM to back up the phone?
Thanks for the help guys.
waldojim said:
Ok, this may be answered elsewhere, I don't know. "Search is temporarily unavailable" I am trying to understand how I am supposed to work with the backup from CWM. I understand that I should have a System image that I can work in, but what I have is 3 files in its place. System.ext4.tar, System.ext4.tar.a, and System.ext4.tar.b. All three files are broken to some degree.
System.ext4.tar is a zero byte file.
System.ext4.tar.a appears to be a spanned tar file that 7ZIP/WinRAR simply think was cut-off (never asks for the second file, and complains of unexpected End of Archive)
System.ext.4.tar.b appears to be the second part of the archive, but nothing will open it.
So, how do I get to a point I have a complete archive that I can edit? Or do I need to use different software than CWM to back up the phone?
Thanks for the help guys.
Click to expand...
Click to collapse
Well, I found a solution for now. Fire up Linux, use cat to combine all three files, then use tar to extract the contents. Not sure why this needed split in the first place, but at least the files can be extracted.
I have managed to remove the APKs I do not want, and made a new system.ext4.tar file (all in Linux), but need to know what else I have to do to make the system image usable.
I found several guides on making a ZIP file, but I didn't want to necessarily go through all that. I backed up everything, so what I would like to know, is what all needs to change so that I can use the separate files as they are, and simply do a CWM "restore" function?
I know I sound like a complete noob at this point, and will deal with the related comments. However, please understand, I don't want the heavily modified rom packs. I simply wanted a rom VOID of all the Verizon bloatware, and have the Verizon tethering restraints removed. I have them all disabled now, and 3rd party tethering is working quite well. So I would rather not have that garbage wasting space. Right now, it looks like I may save 250MB or so.
Any help would be appreciated. Thanks.
waldojim said:
I have managed to remove the APKs I do not want, and made a new system.ext4.tar file (all in Linux), but need to know what else I have to do to make the system image usable.
I found several guides on making a ZIP file, but I didn't want to necessarily go through all that. I backed up everything, so what I would like to know, is what all needs to change so that I can use the separate files as they are, and simply do a CWM "restore" function?
I know I sound like a complete noob at this point, and will deal with the related comments. However, please understand, I don't want the heavily modified rom packs. I simply wanted a rom VOID of all the Verizon bloatware, and have the Verizon tethering restraints removed. I have them all disabled now, and 3rd party tethering is working quite well. So I would rather not have that garbage wasting space. Right now, it looks like I may save 250MB or so.
Any help would be appreciated. Thanks.
Click to expand...
Click to collapse
Backups really aren't meant to be unzipped and played with. Usually bloat removal is done while booted into the system or you can unpackage a Rom and remove the bloat there and then repackage it and flash it then make your backup that doesn't contain any bloat. Using the xda kitchen tools from dsxda I believe is the name
Sent from my HTC6435LVW using XDA Premium HD app
.torrented said:
Backups really aren't meant to be unzipped and played with. Usually bloat removal is done while booted into the system or you can unpackage a Rom and remove the bloat there and then repackage it and flash it then make your backup that doesn't contain any bloat. Using the xda kitchen tools from dsxda I believe is the name
Sent from my HTC6435LVW using XDA Premium HD app
Click to expand...
Click to collapse
I think this is where some of my confusion comes from - it was never zipped. There was a group of tarred files, an MD5sum and a few other items. But nothing there was zipped.
waldojim said:
I think this is where some of my confusion comes from - it was never zipped. There was a group of tarred files, an MD5sum and a few other items. But nothing there was zipped.
Click to expand...
Click to collapse
I guess what I meant to say by "zipped" was just in general they are compressed by the recovery in a way that it knows how to go and use them to restore data to the device.

Categories

Resources