Re-signing the system
Various aspects of the Nook system are signed with a signature from Barnes & Noble.
There are a few places where signatures are compared.
Various system apps used a single "shared id" and they must all have the same signature.
/system/framework/framework-res.apk must have a correct signature with respect to AndroidManifest.xml.
In any case, it's your Nook, what are you going to do?
Re-signing the system
- make a full backup and make sure that it is good
- create your own signature http://developer.android.com/tools/p...p-signing.html
- make a directory for your patch
- create the subdirectory META-INF\com\google\android\
- put a copy of update-binary in there
- write a updater-script and put it in there
- create the subdirectory system\app
- create the subdirectory system\framework
For each of your APKs in /system/app and also /system/framework/framework-res.apk:
- unzip them somewhere
- delete the whole directory META-INF from them
- zip the directory
- jarsigner them with your own personal signature
- zipalign the APK (optional if you are lazy and don't see the point)
- put it in the appropriate patch directory
Then:
- zip the patch directory
- copy it to your SD card
- make sure that your WiFi is turned on if you are using ADB over WiFi!
- recovery boot using ClockworkMod
- install the patch from SD card
- reboot
updater-script
Code:
# Replace signed components
mount("ext2", "/dev/block/mmcblk0p5", "/system");
package_extract_dir("system/app", "/system/app");
package_extract_dir("system/framework", "/system/framework");
unmount("/system");
# Delete packages.xml
mount("ext3", "/dev/block/mmcblk0p8", "/data");
delete("/data/system/packages.xml");
unmount("/data");
Flies in the ointment, caveats, etc...
The packages.xml contains some form of certs that have all changed.
Right now, the simplest way I know to deal with this is just to delete packages.xml.
The problem is, this will break most user applications since the user IDs will no longer agree.
The easiest thing to do is just to reinstall them.
For applications with a lot of data, it would be best to back up the configs or data.
When you first boot up, you may think that you are in a "boot loop".
The boot animation will run continuously.
If you have ADB connect still (and you had better!) you can fix this.
Your launcher application is probably causing lots of error on startup.
There are two ways to fix the problem with the launcher (or any other app)
- uninstall and reinstall it
- go into /data/data/com.myapp.whatever and chown everything to the user id of the application.
Code:
busybox chown -R 10011: databases
Don't chown the lib directory if there is one.
Then you should have a device that boots up normally.
Good luck, Mr. Phelps.