Related
Hi there,
I tried running the Camera from Haykuro's build on my image.
After copying libcamera.so libqcamer.so and libcameraservice.so to /system/lib and changing the Camera.apk in /system/app my Camera and Camcorder disapperead, somebody can tell me the trick?
I don't know what image you are running, but it isn't that simple. The HTC camera.apk requires lots of htc frame work libraries to work. You will have to edit and repack your own boot image to include the com.htc*.jar libraries into class path, and the add and replace some of those libraries to your image. It will require lots of time to test and debug what is missing. It definitely isn't as simple as replacing few .so files and the apk. By the way I couldn't get it to work either but I gave up when I realized I had to rebuild boot.img. Haykuro will probably be able to get it to the adp 1.5 image soon.
I have read somewhere where Haykuro posted this to use H build cam. He did state that it's not quite 100% working and that he'll add this to the new 1.5H build.
adb shell reboot recovery
adb shell mount /system
adb shell rm /system/app/Camera.apk
adb shell rm /system/lib/*cam*.so
adb push libcamera.so /system/lib
adb push libcameraservice.so /system/lib
adb push libqcamera.so /system/lib
adb push Camera.apk /system/app
adb push HTC_Gallery.apk /system/app
adb shell reboot
t4c said:
Hi there,
I tried running the Camera from Haykuro's build on my image.
After copying libcamera.so libqcamer.so and libcameraservice.so to /system/lib and changing the Camera.apk in /system/app my Camera and Camcorder disapperead, somebody can tell me the trick?
Click to expand...
Click to collapse
Hi there,
Thanks for your replay.
I got cam working but got bad problems with force close everytime I try to make some settings. After some tries the camera won't come back up again, what I did:
copy system/lib/*cam* to my build
Camera.apk
HTC_gallery.apk
modified /system/etc/permission/platform.xml for finding the pimlib.
t4c said:
Hi there,
Thanks for your replay.
I got cam working but got bad problems with force close everytime I try to make some settings. After some tries the camera won't come back up again, what I did:
copy system/lib/*cam* to my build
Camera.apk
HTC_gallery.apk
modified /system/etc/permission/platform.xml for finding the pimlib.
Click to expand...
Click to collapse
If you wouldn't mind, send me your platform.xml ([email protected]) I'm 90% sure I know how to fix it to work. Db files are usually the root of all force closes. Settings, acore, messaging... if you have a db with variables that don't exist or missing ones that were added to the apk a crash occurs. I am pretty sure I know what files to fix and we can pack an apk for this...
Hey Twistedumbrella,
thank for your answer and your help, I just sent the xml file.
I am very excited...
Regards
I'd love to get the HTC camera working on the JF 1.5 build. All the camera image adjustments were great. Lemme know if you need someone to test things.
Please Post The steps & Platform.xml Whatever U Did
I am Gona Make A Seperate Thread Of All The apps Ported From Haykuro's Sapphire Builds To JF 1.5
I have Currently Ported The H-Virtual Keyboard To JF 1.5
Yeah i have been waiting for someone to do this...
if you need tester i will gladly do it... =D
ATM I wait for twistedumbrella, he got the cam working but I am completly stuck with this thing.
H cam will make photos but if I try to configure something the cam close forces all the time.
t4c said:
ATM I wait for twistedumbrella, he got the cam working but I am completly stuck with this thing.
H cam will make photos but if I try to configure something the cam close forces all the time.
Click to expand...
Click to collapse
Packing it into an update and testing as we speak
I got the force close problem.
Does anyone find out how to fix it ?
I am running JF 1.5, I push all the .so files also add files into /system/framework
and replace the platform.xml with the one online said for the JF 1.5 HTC app.
The camera will run into a Gray mode, and if I clicked on any icons it will show "force closed"....
Mods: If you think this should go in general section feel free to move it, thanks.
I built a script that will install the new camera (nexus based), it will replace all necessary files to get the camera working as well as hastarins 8.5.1 modules (to get wifi working and all) and finally liblights and libhtc_ril_wrapper (might be overkill, but it works)
Instructions: Unzip CamScript folder to SD Card (anywhere is fine) and then as su (adb shell or terminal emulator, anything you use to run bash scripts is ok) run cam_install.sh
Note: It will replace zImage in either /sdcard/HD2ONE or /sdcard/Android; it will not work if you have a kernel in a folder different to those so edit your startup.txt file if necessary.
Credit goes to hastarin for the kernel and camera files
-OCM
V1.5: Everything should work now, i've tested on stock HD2ONE_Latest. Backup versions of all modified files are saved in /data/cam_backups.
Good job
Sent from my HTC HD2
Thanks for the script,
Noticed that in the Replace_Libs function you copy liboemcamera.so to libcamera.so.old overwriting the other libcamera.so.old!!
I'm guessing you don't want to do that??
I've just tried this on my JDMS 1.5 that already had Hastarin8.5.1 old camera and my Andorid wouldn't reboot.
Anyone got any tips on troubleshooting non-restarting phones??
I've got the HTC splashscreen and I can adb into the phone but from there on I'm a bit lost.
bobjbain said:
Thanks for the script,
Noticed that in the Replace_Libs function you copy liboemcamera.so to libcamera.so.old overwriting the other libcamera.so.old!!
I'm guessing you don't want to do that??
I've just tried this on my JDMS 1.5 that already had Hastarin8.5.1 old camera and my Andorid wouldn't reboot.
Anyone got any tips on troubleshooting non-restarting phones??
I've got the HTC splashscreen and I can adb into the phone but from there on I'm a bit lost.
Click to expand...
Click to collapse
try chmod -R 777 /system/lib/*
bobjbain said:
Thanks for the script,
Noticed that in the Replace_Libs function you copy liboemcamera.so to libcamera.so.old overwriting the other libcamera.so.old!!
I'm guessing you don't want to do that??
I've just tried this on my JDMS 1.5 that already had Hastarin8.5.1 old camera and my Andorid wouldn't reboot.
Anyone got any tips on troubleshooting non-restarting phones??
I've got the HTC splashscreen and I can adb into the phone but from there on I'm a bit lost.
Click to expand...
Click to collapse
Same problem here...i've tried your script on the HD2ONE 0.3.3 Rc2 version. I've followed all the instructions and now im stuck on the green HTC logo.....Can you please tell me how to Manually apply this script because i think it doesnt work properly....thanks
I don't think this fix is going to work with build that is based on cm6 .1 rc2 because it gets boot loops on the htc screen. I will still give this fix a try and report back....
Edit
Tried it and it did not work for me, black screen on the camera...
atoore said:
Those new builds that is based on cm6.1 rc2 wont work with any new kernels with the new drivers. I will try this fix and report back...
Click to expand...
Click to collapse
What do u mean??
ocm7 reported he succefully applied new camera drivers to the HD2ONE_latest build that is based on the cm6.1 rc2...
Any solutions????
Working on it, shouldnt take more than a few minutes
ocm7 said:
Working on it, shouldnt take more than a few minutes
Click to expand...
Click to collapse
Really thanks, anyway tomorrow (now its late night here) i'm going to reinstall the latest HD2ONE build and then applying your script again (still if you told me how to manually add all the stuff it would be better for me)
Uploaded the fixed version, worked on stock HD2ONE_Latest, so it *should* work on other builds but i cant guarantee this. If you're stuck on boot screen you can try running this new script and see if it works, if it doesnt replace system.ext2 with stock from your build then run the script. Sorry about the initial errors...
So, I used your 1.5 script and this time managed to reboot back into Android.
Everything seemed fine except that my camera still had a green tinge when used with the flash.
THEN I realised that I still had the root directory in the Android folder. So assumed/guessed that the libs were being oerwritten by those in the root folder.
So I renamed root to root_old, re-ran your script, rebooted.
Hung like a mule!!
Restoed original JDMS 1.5 system.ext2, rebooted fine.
Except now my accounts don't sync, my camera takes a picture then hangs
I will get it all back thanks to Titanium Backup
--
Looking at your script it's what I've always been doing to install new Kernels. The green tinge was there when I first tried Hasatrin 8.5.1
The only thing that you do different is include a build.prop file (which is wildly different from mine BTW).
So, my question, is it something in the build.prop that is stopping the grren tinge? If so, what??
TIA
as far as i know, this new lib file in CM or MIUI build make camcorder freeze..does it? or does it not?
I have a weird problem: when i'm in terminal emulator, then su (#), but when i try to type run cam_install.sh it says....run: not found......i think it doesnt recognize the run command..is it possibile??
Is there a way to avoid using this script and SIMPLY manually put all the needed files in the correct directories??
Thanks in advance!!!
P.S. I'm doing that in a HD2ONE stock unmodified latest build...
clockcycle4mobile said:
I have a weird problem: when i'm in terminal emulator, then su (#), but when i try to type run cam_install.sh it says....run: not found......i think it doesnt recognize the run command..is it possibile??
Is there a way to avoid using this script and SIMPLY manually put all the needed files in the correct directories??
Thanks in advance!!!
P.S. I'm doing that in a HD2ONE stock unmodified latest build...
Click to expand...
Click to collapse
Try
Code:
./cam_install.sh
there is no 'run' command in linux. Programs are executable and are run by just typing their name.
Of course the file has to be chmod'd to be executable too, but the ./ gets around that mostly.
It didn't work with HD2ONE-0.3.3.RC2
Just stuched in HTC welcome page
bobjbain said:
Try
Code:
./cam_install.sh
there is no 'run' command in linux. Programs are executable and are run by just typing their name.
Of course the file has to be chmod'd to be executable too, but the ./ gets around that mostly.
Click to expand...
Click to collapse
Thanks, i've done everything....android rebooted correctly but black screen on camera application...
ocm7 tell me how you made the camera application work properly....i tried and didn't work...
Mine says on every file "file not found" or something like that.
lesjaw said:
as far as i know, this new lib file in CM or MIUI build make camcorder freeze..does it? or does it not?
Click to expand...
Click to collapse
It does if you record on the highest setting (720p)
hhhawasly said:
It didn't work with HD2ONE-0.3.3.RC2
Just stuched in HTC welcome page
Click to expand...
Click to collapse
Worked perfectly for me on a stock system, are you sure all the files got copied right (no errors printed)?
clockcycle4mobile said:
Thanks, i've done everything....android rebooted correctly but black screen on camera application...
ocm7 tell me how you made the camera application work properly....i tried and didn't work...
Click to expand...
Click to collapse
Since everyone is having such a hard time getting it to work here are the manual instructions:
Replace your current kernel with hastarins 8.5.1
Replace Camera.apk in /system/app
Replace libcamera.so, liboemcamera.so, libOmxCore.so, libOmxVdec.so, libOmxVidEnc.so in /system/lib
Optional but recommended: replace lights.qsd8k.so in /system/lib/hw and rename or remove /system/lib/hw/lights.htcleo.so also replace libhtc_ril_wrapper.so in /system/lib
replace bcm4329.ko, tun.ko and cifs.ko in /system/lib/modules
place 99complete in /system/etc/init.d and chmod it to 755 (important!)
replace build.prop to fix green tint (I got it from the green tint fix thread and just replaced some lines to match CM6)
reboot
Also, i said these libs were nexus based so if your build is desire based it simply wont work
ocm7 said:
It does if you record on the highest setting (720p)
Worked perfectly for me on a stock system, are you sure all the files got copied right (no errors printed)?
Since everyone is having such a hard time getting it to work here are the manual instructions:
Replace your current kernel with hastarins 8.5.1
Replace Camera.apk in /system/app
Replace libcamera.so, liboemcamera.so, libOmxCore.so, libOmxVdec.so, libOmxVidEnc.so in /system/lib
Optional but recommended: replace lights.qsd8k.so in /system/lib/hw and rename or remove /system/lib/hw/lights.htcleo.so also replace libhtc_ril_wrapper.so in /system/lib
replace bcm4329.ko, tun.ko and cifs.ko in /system/lib/modules
place 99complete in /system/etc/init.d and chmod it to 755 (important!)
replace build.prop to fix green tint (I got it from the green tint fix thread and just replaced some lines to match CM6)
reboot
Also, i said these libs were nexus based so if your build is desire based it simply wont work
Click to expand...
Click to collapse
Well I've done every single step you wrote but still camera app is totally black after reboot.....this is very weird since i've used the same build you used (nexus based) but my result is so different from yours....
ATT 2.3.5 SystemUI
quickpanel_title_background.9 I Can not define
This is nice!
A few suggestions:
- Less icon spacing. Should fit at least 5 on the screen at once.
- No vibrate icon. It's unnecessary. Holding the power button works fine.
- Brightness control.
Thank you. Well done
Sent from my MB860 using Tapatalk
Hi can I install this on rooted locked atrix on 2.3.4!? I'm on UK retail. The thanks
Sent from my MB860 using XDA App
Wow. This is what I wanted.
Thank you
I'm on a rooted US ATT 2.3.4. How can I get this to install? I tried abd install, that didn't work...
--Q
EDIT: I think I figured it out. You have to go into /system/app and rename SystemUI.apk and SystemUI.odex to have .bak then copy the modified SystemUI.apk and then chmod 644 it. Rebooting now...will keep you posted!
EDIT2: Yep! Totally worked! GENIUS!! THANKS!
Do I really need to use adb or can do chmod by using some tool on phone?
Sent from my MB860 using XDA App
You can do all this with Root Explorer if you have it. Same idea.
I think the OP is trying to edit the SystemUI.apk to include more functions. If so, may take a look here. Not sure if that will help too much or not...?
for the other posting people, here's what I have been running for a while..
basically Darkside's stock SystemUI with a theme hacked together from thread mentioned above as well. MIUI Icon set I think is what he says...
To install:
Download file to C: or where ever(if downloaded to someplace else, fix path in the commands below).
Start Menu --> Run --> cmd
On Windows 7 (or XP): hold the Windows Key on keyboard and press R together. Input CMD and hit OK
On Linux: well, you know whats up
On MAC: unplug the computer and toss it out the window.. j/k. This wont work for you though. Follow normal procedure to use ADB in your teminal
Inside CMD Prompt, in this order:
adb push C:\SystemUI.apk /sdcard/SystemUI.apk
adb shell
su
/bin/mount -o remount,rw /system
cp /sdcard/SystemUI.apk /system/app/SystemUI.apk
chmod 644 /system/app/SystemUI.apk
exit
exit
adb reboot
Lack of ability to use a lot of smali. Or else can do more...
ein1002 said:
Lack of ability to use a lot of smali. Or else can do more...
Click to expand...
Click to collapse
I love the last one you've posted.
But could you please replace the vibration by the luminisity control?
And the order would be:
Wifi; Mobile DATA; Bluetooth; GPS, Brightness, Screen Orientation
Shaydar said:
I love the last one you've posted.
But could you please replace the vibration by the luminisity control?
And the order would be:
Wifi; Mobile DATA; Bluetooth; GPS, Brightness, Screen Orientation
Click to expand...
Click to collapse
I have no way to make the right moves Brightness:(
So I removed the BrightnessSettingButton
Leaving only the image resources
Hope someone can fix. And add this part.
sorry. My English is not good
Thanks, It does not matter anyway.
The Screen is so bright that I always set the brightness to its lowest.
malfuncion said:
I think the OP is trying to edit the SystemUI.apk to include more functions. If so, may take a look here. Not sure if that will help too much or not...?
for the other posting people, here's what I have been running for a while..
basically Darkside's stock SystemUI with a theme hacked together from thread mentioned above as well. MIUI Icon set I think is what he says...
To install:
Download file to C: or where ever(if downloaded to someplace else, fix path in the commands below).
Start Menu --> Run --> cmd
On Windows 7 (or XP): hold the Windows Key on keyboard and press R together. Input CMD and hit OK
On Linux: well, you know whats up
On MAC: unplug the computer and toss it out the window.. j/k. This wont work for you though. Follow normal procedure to use ADB in your teminal
Inside CMD Prompt, in this order:
adb push C:\SystemUI.apk /sdcard/SystemUI.apk
adb shell
su
/bin/mount -o remount,rw /system
cp /sdcard/SystemUI.apk /system/app/SystemUI.apk
chmod 644 /system/app/SystemUI.apk
exit
exit
adb reboot
Click to expand...
Click to collapse
Many many thanks! This needs to be in new thread. please post it or I will.
I really liked the darkside ROM, But I soft bricked my phone at least 15 times trying Arabic letters connecting solutions under 2.3.5. So I flashed the Aura ROM missing the quick panel from the Darkside ROM the most.
Not only I have the quick panel now with Aura 2.3.4, the icons also look cleaner/better.
Great job. Thanks to you and Nottach also!
CyberPunk7t9 said:
Many many thanks! This needs to be in new thread. please post it or I will.
I really liked the darkside ROM, But I soft bricked my phone at least 15 times trying Arabic letters connecting solutions under 2.3.5. So I flashed the Aura ROM missing the quick panel from the Darkside ROM the most.
Not only I have the quick panel now with Aura 2.3.4, the icons also look cleaner/better.
Great job. Thanks to you and Nottach also!
Click to expand...
Click to collapse
Any chance you upload your version and share it? I'm looking for exactly the same thing and sadly 2.3.5 Darkside ain't providing that.
Sent from my Atrix 4g using Tapatalk
Abu-7abash said:
Any chance you upload your version and share it? I'm looking for exactly the same thing and sadly 2.3.5 Darkside ain't providing that.
Sent from my Atrix 4g using Tapatalk
Click to expand...
Click to collapse
It's just the latest Aura ROM (found in the development section) + this awesome quick panel MOD.
Aura is based on 2.3.4. I noticed that arabic fonts were connecting properly in the system+browser with Aura ROM as-is. No framework.jar or lebwebcore.is hacks are needed with that ROM.
Root+Battery % icons MOD+No carrier logo MOD+proper Arabic font connecting+this quick panel MOD is pretty much what I want now in my Atrix. Currently happy to have all that.
Not to mention a lot of other plus features Aura ROM adds.
Hi,
I was using this mod on 2.3.4 and it was great! Just upgraded to Android OS 2.3.6 (att build 4.5.141) and it just boot loops until I replace it back with the original. Is there any way to modify this to work on 2.3.6? Or, is there a version around that I'm not finding that will work on 2.3.6?
Thanks!
--Q
If you use applications in landscape mode, you may have noticed this already.
When your Nook sleeps or is sent to sleep your normal portrait screensaver appears rotated, squished and with black borders.
Clearly, the Nook developers never anticipated that people would be using landscape mode.
I have a mod to /system/framework/services.jar to fix this.
If the graphic is either 600 x 800 or 800 x 600 it will put it in the orientation that fits.
If the graphic is 800 x 800 it will put it in the current orientation, centered at a scale of 1:1.
Since a lot of people seem to use a moded system.jar already it would have to be integrated in.
Is there interest in this?
I am very interested!!
Can u share your mod?
Well, with all the modded services.jar and various updates maybe posting the injected smali code?
Or is that too difficult/annoying?
sounds great! but still I would prefer no-screen-saver mod. i.e. you can see you launcher widgets (calendar, task, time, battery) all the time. These s.s. pictures are quite antiproductive.
Renate NST . we are waiting !
Ok, here goes. My apologies if this is complicated.
I didn't want to distribute B&N code or presume what mods where already in your services.jar
Code:
adb pull /system/framework/services.jar
apktool d services.jar \Services
Edit \Services\smali\com\android\server\PowerManagerService.smali
parta.txt replaces 3 lines in the original that have to do with parse / move / setImageURI
Delete those lines and insert the file where the .line statements match.
You can leave both the comments in parta.txt and the .line statements there.
partb.txt gets inserted at the end of the file.
Code:
apktool b \Services services.jar
adb push services.jar /system/framework/
You probably want to clear the cache and reboot at that point.
Note: If you are using the standard slide unlock, the image placement code for that is in android.policy.jar
That defaults to portrait orientation. It is not affected by this mod.
Please tell me if this works for you.
This is a nice idea. However, when you use book cover as screensaver via Cool Reader most of them aren't 800x600 images. The B&N default behavior is to resize to fit the screen (keep aspect ratio), but with your mod the picture appears at 1:1 scale (normally cropped). Would this be an easy fix?
marspeople said:
Would this be an easy fix?
Click to expand...
Click to collapse
Tomorrow.
It's tomorrow.
I hope that I covered all the cases because more variants will require user configuration somewhere.
If the image is 600 x 800, 800 x 600 or an aspect ratio of 3:4 or 4:3 it will fit exactly.
If the image has another aspect ratio it will fit inside with side strips in white.
If the image is exactly square it will use the current orientation and overfill the screen.
In all cases the aspect ratio will be preserved and at least one axis will fit exactly.
When the lock screen with the slider pops up the image will not be consistent.
This is because B&N handled the screensaver image there separately.
I will be releasing a mod for android.policy.jar to fix that soon.
(Or you could switch to another screen locker.)
Install procedure same as above.
Ok, here's the one that fixes the lock screen too.
parta.txt and partb.txt are the same as they were.
partc.txt and partd.txt are for LockScreen inside android.policy.jar
Code:
adb pull /system/framework/android.policy.jar
apktool d android.policy.jar \Policy
Edit \Policy\smali\com\android\internal\policy\impl\LockScreen.smali
partc.txt replaces the entire updateBackgroundImage method.
partd.txt gets inserted at the end of the file.
Code:
apktool b \Policy android.policy.jar
adb push android.policy.jar /system/framework/
As always, be careful and backup.
(This is also in the readme file.)
Warning: This is only for Nook 1.12 and older, not for Nook 1.2 and newer.
Oh, and if you're tired of dragging to unlock your NOOK™,
place the extracted files in /res/drawable-mdpi/ inside /system/framework/framework-res.apk
Just to be clear, this doesn't change the manner of unlocking, just the look.
(The folks at B&N made the graphics shorter by making the top 30 pixels transparent.
That was an unnecessary hack, as long as all four graphics are the same height it works fine.)
signing / alternative to adb push
Renate,
thank you for the mods. The rotated screensaver has been irritating me for some time ;-) And I intend to put my email instead of the "slide to unlock" text..
Just 2 questions, before I do so:
1) do I need to sign the modified .jar/.apk files?
2) As I do not have ADB installed, I intend to change the files from a command line over ssh (i.e. copy, chown, chmod). My understanding is that this should be equivalend to adb push. Is this so?
Cheers
ajislav said:
1) do I need to sign the modified .jar/.apk files?
Click to expand...
Click to collapse
"Badges? Badges? We don't need no stinkin' badges."
No, if you copy in anything directly you bypass all the signing stuff.
How you get the files over is however you like.
Bootloop
Hi,
I tried to do both changes (screensaver, slider) but since the recompilation of services.jar and android.policy.jar was giving me errors (see below), I decided to go with replacing framework-res.apk
what I did was
ssh into my nook
Code:
cd /system/framework/
mount -o remount,rw /dev/block/mmcblk0p5 /system
#copy the new framework into target dir
cp /sdcard/download/framework-res.apk ./framework-res.apk.new
#fix permissions
chmod 644 framework-res.apk.new
#make a backup
cp framework-res.apk framework-res.apk.old
#replace the file
cp framework-res.apk.new framework-res.apk
now at that moment I got the bootloop screen.. however ssh was still working, so I run the following line to restore the framework:
Code:
cp framework-res.apk.old framework-res.apk
and rebooted.. I am getting bootloops ever since..
I can boot to CWM. so I tried both what I should have done in the first place, i.e. replace the file in CWM
I tried this
http://forum.xda-developers.com/showpost.php?p=24728342&postcount=22
(fixes permissions)
and this
http://forum.xda-developers.com/showpost.php?p=23607664&postcount=11
(restores the old framework and fixes permissions)
but none seem to work... still the same bootloop (nook by B&N and 5 dots going from Left to Right)..
any ideas? I'd rather not go all the way to factory restore
p.s. I also tried wiping cache and dalvik-cache in CWM.. could this cause any problems?
p.p.s. the errors I got with recompiling the jars are:
Code:
>apktool b .\Services2 services.jar
I: Checking whether sources has changed...
W: Could not find resources
I: Building apk file...
is the "Could not find resources" normal?
Let's take the easy one first.
Compiling the jars will return "No resources found", because they are just jars.
You should always check to make sure that the output is about the same size as the original.
It may be a bit bigger or smaller depending on the vagaries of compression.
Now the toughie.
Hot-swapping jars is a bit risky.
In the best of all worlds, you'd like to swap them when they are not being used.
Swapping framework-res.apk could make it crash when something can't find a resource,
but it's not code and generally if you leave the Nook sitting it won't try to access anything.
If all you did was replace one file and now you replaced it back it should be working.
I don't know how you are getting a ssh into the Nook.
I've got no port 22 or 23 open.
Hi Renate,
Compiling the jars will return "No resources found", because they are just jars.
You should always check to make sure that the output is about the same size as the original.
It may be a bit bigger or smaller depending on the vagaries of compression.
Click to expand...
Click to collapse
I did this, of course. The files are generally sightly smaller, in the case of framework-res.apk the change is relatively big: from 2,897,726 to 2,381,970 (but I am not worried about this as I get a similar size decrease even during simple decompile/recompile)
Swapping framework-res.apk could make it crash when something can't find a resource,
but it's not code and generally if you leave the Nook sitting it won't try to access anything.
If all you did was replace one file and now you replaced it back it should be working.
Click to expand...
Click to collapse
I know, and I totally agree with you!
My conclusion is that something got corrupted..
I tried removing the apk.old and apk.new files via CWM (to make sure they are not in the way)
I also tried running e2fsck -p /dev/block/mmcblk0p5 via CMW (from http://forum.xda-developers.com/showpost.php?p=21915065&postcount=59 )
.. but still the same bootloop.
Is there any way to see some logs of the failed boots?
Since I did not make a backup just before doing this change (and I know you had adviced to do so ), the only thing which I can think of now is
a) create a backup with noogie
b) mount the image and check what is actually in /system
unfortunately, I do not have access to linux so this would be kind of pain (my old laptop with WinXPSP3 is the main reason, why I dont have ADB..)
And I am not sure if this is not more complicated than reinstalling everything from scratch..
Thanks for your help, I'll probably give it a day's rest and then do the factory reset..
I don't know how you are getting a ssh into the Nook.
I've got no port 22 or 23 open.
Click to expand...
Click to collapse
I have droidSSHd installed and am able to connect easily with Putty.
Have you already tried to look at dmesg? logcat?
I am not sure how to do this (dmesg, logcat)
I was probably unclear about the ssh - I WAS able to ssh in when Nook was booting normally. Now I cannot.
Is there any way to do this from CWM? (I mean dmesg, logcat)
I was wondering how you were in a boot loop and managed to ssh.
Code:
# dmesg
.....
# logcat
.....
If you don't have a shell this is not going to do you any good.
I used noogie to get an img which I then mounted (using OSFMount and Ext2IFS) under windows..
looking at the /system partition, I see that
- my .old and .new files are gone
- the correct framework-res.apk is in place
i.e. the CWM scripts I have run did their job correctly.. so they have effectively undone any changes that I have made.. so the nook should boot up without any problems
weird....
so I guess my only options are
- restore my pre-root backup
- factory reset
Forgive me if I have a gross misunderstanding about the hardware in the NST, but in my eyes it should be possible for the Nook to sleep but retain the screen, perhaps with a small banner indicating it's in sleep state and you need to press the 'n' to wake. It just seems silly having the benefit of an e-ink display only for the screensaver to kick it when it sleeps. If it didn't do this, I could (for example) leave a map open in OsmAnd and refer to it still while the Nook is sleeping. The only 'solutions' to this I've found involved plain and simply keeping the Nook awake! A hack I can think of would be to somehow bodge something together to take a screenshot just before the nook sleeps and set it as the screensaver image. Seems silly though... I've had a search around and can't find anything related to this specifically, more either people wanting to keep the nook awake or disable the slide to unlock.
Any thoughts welcome!
I had the exact same thought,
so I'm making an app that takes a screenshot every 1:50 minutes and saves it at a screensaver,
to be displayed when the nook goes to sleep.
hopefully it will be ready this weekend so stay tuned
It should be be simple enough.
Modify /system/framework/android.policy.jar
The class is com.android.internal.policy.impl.LockScreen
What puts up the "screensaver" is updateBackgroundImage()
The layout is in /system/framework/framework-res.apk,
res/layout/keyguard_screen_gossamer_unlock.xml
I'm not sure if changing the layout to transparent and not updating the image should be enough.
Renate NST said:
It should be be simple enough.
Modify /system/framework/android.policy.jar
The class is com.android.internal.policy.impl.LockScreen
What puts up the "screensaver" is updateBackgroundImage()
The layout is in /system/framework/framework-res.apk,
res/layout/keyguard_screen_gossamer_unlock.xml
I'm not sure if changing the layout to transparent and not updating the image should be enough.
Click to expand...
Click to collapse
Oh I wish you would have said that two days ago...
It seems a far better solution than my app, maybe I'll try playing with that later.
I tried replacing updateBackgroundImage()
with a stub, but the screensaver still comes up as usual,
Only difference is the "slide to unlock" screen now has black background, so that's what this function is doing.
Time for plan B (or C, really):
If I were to modify framework-res.apk as you suggest, Will I need to resign the whole system, as here?
Update -
The function that sets the screensaver is createScreensaver(), in class com.android.server.PowerManagerService, found in /system/framework/services.jar
I modified it to make the screensaver invisible, but unfortunately it also means there's no indication that the nook sleeps.
Anyway, it's better than constantly taking screenshots, so I'll stick with that.
nivieru said:
Update -
The function that sets the screensaver is createScreensaver(), in class com.android.server.PowerManagerService, found in /system/framework/services.jar
I modified it to make the screensaver invisible, but unfortunately it also means there's no indication that the nook sleeps.
Anyway, it's better than constantly taking screenshots, so I'll stick with that.
Click to expand...
Click to collapse
How did you do that? I'm using the screenshot sreensaver app for that and I find it very useful. But the above mentioned way seems to be less power consuming. Could you explain it for somebody with very little knowledge about manipulating apk, though I know how to manipulate apk with xdaAutotool.
I don't know xdaAutotool, I use apktool but you can probably use whatever tool you like.
First you need a patched /system/framework/services.jar
the one I attached here is for firmware 1.2.1 rooted with NookManager, so it also includes the NookManager patches.
if this is your setup as well, skip to 4
if you run a different firmware or don't want the NookManager patches you will need to patch it yourself
patching /system/framework/services.jar - some vauge instructions:
you will need apktool (or XdaAutotool or whatever) and the android-sdk.
1) use apktool to decompile services.jar
2) modify createScreensaver() in file smali/com/android/server/PowerManagerService.smali according to the attached patch-services.txt
notice - this patch is for firmware 1.2.1 with NookManager patches, it might not be ready for use with other versions - not only the line numbers, also the register v6 might not be a good choice if it is used later in the code without being assigned a new value first.
3) recompile with apktool.
replacing services.jar with patched version - complete instructions:
4) making a full backup before messing with the system is good practice, although the nook is notoriously hard to brick.
you could use NookManager to do the backup.
5) connect to your device with adb
6) apply these commands:
Code:
adb push pathced-services.jar /media
adb shell stop
adb shell mount -o remount,rw /dev/block/mmcblk0p5 /system
adb shell cp /system/framework/services.jar /system/framework/services.jar.backup
adb shell cp /media/pathced-services.jar /system/framework/services.jar
adb shell chmod 644 /system/framework/services.jar
adb shell reboot
7) relax, first boot takes a few minutes, this is normal.
with this patch the screensaver is invisible, so there is no indication at all that the device is asleep.
also, there's no magic button to change behavior - if you want to the screensaver back you need to replace services.jar with original version
Thanks for that extensive description. I'll try the next days to implement it in my system which differs from yours, since I'm using the custom rom from pinguy1982.
Got it.
I compared your PowerManagerService.smali with the one in my services.jar and made the changes.
Recompiled the services.jar.
Exchanged the original classes.dex with the new compiled classes.dex in 7zip.
Signed the jar file.
Had a lot of problems with adb, which didn't recognize my device.
Lost my temper, packed it into a ZIP-file and replaced it via CWM.
Everything is working now. Thanks!
nhedgehog said:
Got it.
I compared your PowerManagerService.smali with the one in my services.jar and made the changes.
Recompiled the services.jar.
Exchanged the original classes.dex with the new compiled classes.dex in 7zip.
Signed the jar file.
Had a lot of problems with adb, which didn't recognize my device.
Lost my temper, packed it into a ZIP-file and replaced it via CWM.
Everything is working now. Thanks!
Click to expand...
Click to collapse
Hi @nhedgehog
I also use the custom rom from pinguy1982.
Can you share your zip file to flash with CWM
Thanks
tebra said:
Hi @nhedgehog
I also use the custom rom from pinguy1982.
Can you share your zip file to flash with CWM
Click to expand...
Click to collapse
Here you are:
Patch (nivieru's method) via ZIP, tested only with modded ROM from pinguy1982 and installed Nooter-Part1.zip. Install via CWM, to be safe make a backup before you do the patch.
Services-org.zip=original services.jar
Services-patch.zip=patched services.jar
Hi everyone!
I've patched the jar and now enjoy the last image in sleep mode. But, I'd like to wake app the Nook every few hours, update the page in dolphin and go back sleep. Page in dolphin has a meta refresh. But I can't wake up the Nook on interval. Is it impossible or I missing smth very important on this topic?
If anybody has some experience on topic, please comment.
Update, my solution:
Re-signed the system with personal cert and implemented an app instead of dolphin+web page.
App wakes up every few hours, updates view and throws device to deep sleep. Hope to get an uptime up to 10-15 days.
nivieru said:
I
replacing services.jar with patched version - complete instructions:
4) making a full backup before messing with the system is good practice, although the nook is notoriously hard to brick.
you could use NookManager to do the backup.
5) connect to your device with adb
6) apply these commands:
Code:
adb push pathced-services.jar /media
adb shell stop
adb shell mount -o remount,rw /dev/block/mmcblk0p5 /system
adb shell cp /system/framework/services.jar /system/framework/services.jar.backup
adb shell cp /media/pathced-services.jar /system/framework/services.jar
adb shell chmod 644 /system/framework/services.jar
adb shell reboot
7) relax, first boot takes a few minutes, this is normal.
with this patch the screensaver is invisible, so there is no indication at all that the device is asleep.
also, there's no magic button to change behavior - if you want to the screensaver back you need to replace services.jar with original version
Click to expand...
Click to collapse
I've done exactly as described in points 4-7 on NST firmware 1.2.1 , rooted with Nook Manager.
I used Root explorer for replacement and rename of patched-services.jar.
After rebooting of NST, it works as intended - the screensaver is unseen, but it appears other problem.
When i click at random .apk, nothing happens, only the screen is flickering once and that's all.
I cannot install apk-s, nor uninstall them....? WTF ?
Someone with explanation...?
gsms said:
I've done exactly as described in points 4-7 on NST firmware 1.2.1 , rooted with Nook Manager.
I used Root explorer for replacement and rename of patched-services.jar.
After rebooting of NST, it works as intended - the screensaver is unseen, but it appears other problem.
When i click at random .apk, nothing happens, only the screen is flickering once and that's all.
I cannot install apk-s, nor uninstall them....? WTF ?
Someone with explanation...?
Click to expand...
Click to collapse
Replacing services.jar while the android system is running can cause problems, that's why I suggest doing it through adb after issuing the "stop" command, which stops android while leaving the underlying linux (with adb) running.
You should try that and see if it helps.
I will try, but before that another question from me.
Is there a chance the file "patched-services.jar" to be remade as .zip file and installed thru CWM.
If this can be done, i will be glad somebody to share the .zip file, because i think it is more comfortable for installation than using adb shell....
thanks
P.S. Adb don't work correctly for me, so the only available option is obviously flashable .zip file...
...
Has anyone tried this with FW 1.2.2 yet?
jptiger said:
Has anyone tried this with FW 1.2.2 yet?
Click to expand...
Click to collapse
If the original services.jar was patched, it will break NTMM since that relies on patches. But if you can discern what the additional patches are you could patch the 1.2.2 file used in NookManager.
Edit: but if you just want to see how it might work, you can probably use the 1.2.1 jar without any problems. When I first started working on the update to NookManager I used the original 1.2.0 jars that were provided with FW 1.2.2 and saw no evidence of problems. A diff showed very minor changes. Depending on how extensive the patching is for this mod, it might be easier--if you still want the use of NTMM--to patch the file in post #8 for NTMM since the patches are well documented on github. Otherwise you have a lot of diffs to look at and sort out.