[Q] Some help with creating an Update.zip for my A7 please - A7 General

I'd appreciate it if someone could give me some assistance. Basically the situation is that I wanted to get VPN working on the A7 which required tun.ko. I cross compiled the kernel and managed to get a tun.ko file and I added it to my device. Installing the module did not work, so I left it.
At some point my A7 shut off, and now it will not boot, it hangs at the ANDROID screen, before getting to the HC animation (dexmod 1.42). I am assuming at this point that my tun.ko is the issue so I created a patch update to remove the modules I had added to see if that would work.
Note: This patch is exactly the same as the ElocityMod 1.4.2 ad-hoc patch, I just changed the script actions and re-bundled.
The script only does this:
delete_recursive SYSTEM:lib/modules
delete SYSTEM:lib/tun.ko
I created the /system/lib/modules dir, so I know it exists, as does the /system/lib/tun.ko. When I try to run the update script I get the following error:
Installing Update
close from_child
E:Error in /sdcard/update.zip
(Status 6[1536])
Installation aborted.
I am trying not to flash back to the 1.4.2 as I have some investment and stupidly did not back-up before I started this venture. Any help would be appreciated.
Brad
As a side note, according to the /proc/config.gz on the tablet (kernel config) the TUN/TAP is compiled into the kernel, but not compiled as a module. For this reason I doubt VPN will work unless the apps can recognize the TUN device instead of failing because the module does not exist.

with specifics to an update script, the script desired should be as follows
Code:
run_program("/sbin/busybox", "mount", "-orw,remount","/system");
delete("/system/lib/tun.ko");
run_program("/sbin/busybox", "mount", "-oro,remount","/system");
you will need to remember to sign your update.zip after creation if you're not familiar with the process. searching on xda should turn up results for 'sign update.zip'.
i'd list the specific files and not do recursive deleting. though if introducing a kernel module caused you problems, i don't think it was merely copying/removing that had an effect, but wouldn't you have had to either issue an 'insmod' command manually or you added a call to that module using insmod added to the init.rc or a bash script. you need to remove that reference too if you did.
if your 'investment' is related to your /data folder (with your stored apps and app settings), you can use my cwm fakeflash recovery to backup and restore your /data contents (installed apps, and system settings) after a factory reset and reloading dexter's rom (using factory recovery).
alternative solutions; maybe if you were doing these kind of experiments you MIGHT have left the usb device setting on (for adb connectivity). if so, try to adb shell into the device to correct your problem by hand; type adb devices from a command prompt for fun to see if the device still lists (it did for me when softbricked once).
domito said:
I'd appreciate it if someone could give me some assistance. Basically the situation is that I wanted to get VPN working on the A7 which required tun.ko. I cross compiled the kernel and managed to get a tun.ko file and I added it to my device. Installing the module did not work, so I left it.
At some point my A7 shut off, and now it will not boot, it hangs at the ANDROID screen, before getting to the HC animation (dexmod 1.42). I am assuming at this point that my tun.ko is the issue so I created a patch update to remove the modules I had added to see if that would work.
Note: This patch is exactly the same as the ElocityMod 1.4.2 ad-hoc patch, I just changed the script actions and re-bundled.
The script only does this:
delete_recursive SYSTEM:lib/modules
delete SYSTEM:lib/tun.ko
I created the /system/lib/modules dir, so I know it exists, as does the /system/lib/tun.ko. When I try to run the update script I get the following error:
Installing Update
close from_child
E:Error in /sdcard/update.zip
(Status 6[1536])
Installation aborted.
I am trying not to flash back to the 1.4.2 as I have some investment and stupidly did not back-up before I started this venture. Any help would be appreciated.
Brad
As a side note, according to the /proc/config.gz on the tablet (kernel config) the TUN/TAP is compiled into the kernel, but not compiled as a module. For this reason I doubt VPN will work unless the apps can recognize the TUN device instead of failing because the module does not exist.
Click to expand...
Click to collapse

..alternatively alternatively i also did a update.zip of the latest factory rom that may assist with your issue, if the above solutions do not work. assuming your 'investment' isn't in the /system folder, it can format your /system folder and reinstall the /system files from the factory firmware with all correct permissions. a little examination of my update.zip could be used as a template for creating a similar one for dexter's rom, for these particular times when you'd like to re-do your /system folder and leave the rest of your partitions and data intact.
locatable, roundabout, from my twitter. same name as here.
oh. you could just write a script to execute a bash script (file.sh) thats got simple copy commands to copy your 'investment' to sdcard (/sdcard in recovery). that might be the simplest non creative approach that would allow you to continue on with a normal factory reset and reload of dexter's rom.
using bash scripts might also aid you in doing what you want without having to know or experiment with proper scripting syntax.
..oh, AND you could just edit dexter's rom update.zip to only install the system.img, and remove the rest of the files for installation, and DON"T do a factory reset..
that could help with restoring your system filesystem while leaving the rest of your data intact. didn't occur until this morning, that might be you EASIEST of the multiple suggestions listed.

Thanks for the response!
bestialbub said:
with specifics to an update script, the script desired should be as follows
Code:
run_program("/sbin/busybox", "mount", "-orw,remount","/system");
delete("/system/lib/tun.ko");
run_program("/sbin/busybox", "mount", "-oro,remount","/system");
Click to expand...
Click to collapse
This was actually what I did for my first try, with the same result.
bestialbub said:
you will need to remember to sign your update.zip after creation if you're not familiar with the process. searching on xda should turn up results for 'sign update.zip'.
Click to expand...
Click to collapse
I did not do this, I was not sure I had to.
bestialbub said:
i'd list the specific files and not do recursive deleting. though if introducing a kernel module caused you problems, i don't think it was merely copying/removing that had an effect, but wouldn't you have had to either issue an 'insmod' command manually or you added a call to that module using insmod added to the init.rc or a bash script. you need to remove that reference too if you did.
Click to expand...
Click to collapse
I did insmod it as well as modprobe, it gave me an error which was likely because (as I found later) the TUN is compiled into the kernel, which means a module could not possibly load.
bestialbub said:
if your 'investment' is related to your /data folder (with your stored apps and app settings), you can use my cwm fakeflash recovery to backup and restore your /data contents (installed apps, and system settings) after a factory reset and reloading dexter's rom (using factory recovery).
Click to expand...
Click to collapse
I'll have to take a look at that, I was no aware it existed.
bestialbub said:
alternative solutions; maybe if you were doing these kind of experiments you MIGHT have left the usb device setting on (for adb connectivity). if so, try to adb shell into the device to correct your problem by hand; type adb devices from a command prompt for fun to see if the device still lists (it did for me when softbricked once).
Click to expand...
Click to collapse
The issue with the A7 is that it's got USB host only which means I cannot connect it to my PC and adb it. This was a known issue before I bought the A7.

bestialbub said:
..alternatively alternatively i also did a update.zip of the latest factory rom that may assist with your issue, if the above solutions do not work. assuming your 'investment' isn't in the /system folder, it can format your /system folder and reinstall the /system files from the factory firmware with all correct permissions. a little examination of my update.zip could be used as a template for creating a similar one for dexter's rom, for these particular times when you'd like to re-do your /system folder and leave the rest of your partitions and data intact.
locatable, roundabout, from my twitter. same name as here.
oh. you could just write a script to execute a bash script (file.sh) thats got simple copy commands to copy your 'investment' to sdcard (/sdcard in recovery). that might be the simplest non creative approach that would allow you to continue on with a normal factory reset and reload of dexter's rom.
using bash scripts might also aid you in doing what you want without having to know or experiment with proper scripting syntax.
..oh, AND you could just edit dexter's rom update.zip to only install the system.img, and remove the rest of the files for installation, and DON"T do a factory reset..
that could help with restoring your system filesystem while leaving the rest of your data intact. didn't occur until this morning, that might be you EASIEST of the multiple suggestions listed.
Click to expand...
Click to collapse
In the end I went more heavy handed than all that and it worked out fine. I did this before I saw your response otherwise I would have tried to finesse it some more just for the fun of it.
I re-flashed with dexmod 1.41 but I did not reset or wipe anything first. Applying this over top got me booted again with all my apps. 1 quick 1.42 update (and annoying root FB upgrade) and I am back to pre-fail conditions. I backed up my stuff too.
Thanks again for all the useful tips. This type of event has happened a few times and my gut says I am getting some corruption on the NVRAM or something. Only time will tell.

adb connectivity works fine, the solution is buried in one of 5stronginos threads, maybe the cwm recovery one. google for USB_OTG.APK i think, its posted on xda w a download link.
..i also prepackage it in my firmware repack.. findable from my twitter.
Sent from my X10i using Tapatalk

bestialbub said:
adb connectivity works fine, the solution is buried in one of 5stronginos threads, maybe the cwm recovery one. google for USB_OTG.APK i think, its posted on xda w a download link.
..i also prepackage it in my firmware repack.. findable from my twitter.
Sent from my X10i using Tapatalk
Click to expand...
Click to collapse
I found this one, which looks right.
http://forum.xda-developers.com/showpost.php?p=12813894&postcount=36
I'll give it a shot. Thanks for the info.

Related

[Script] VERY simple application backup script for ROM upgrades [not for newbies]

Hi,
I'm new to the business and I spent some time to learn the environment trying different applications and different approaches for almos every action I took. Today, I have not much bigger knowledge, but I finally decided to take few things in my own hands because existing software is not fulfilling my wishes.
I started with this simple script which eases the pain of reinstalling all applications after ROM upgrade. There are few such tools already, but I found those quite bloated with unnecessary thing for my own approach.
With this script I assume:
1. There is/was SSHDroid installed (or any tool with busybox and you can access shell command line) both in old and new ROMs and your ROM have bash installed in /system/bin/.
2. Backup/restore operation includes only INTERNALLY installed applications, it completely ignores SYSTEM and SDCARD installed ones.
3. This is TEMPORARY backup so it should be as fast as possible not caring about occupied space (!). Althought I added -zip parameter to enable compression if you are running out of space on your sd.
4. Installed ROM is clean with no additional apps installed (excluding those needed by the script)
5. You have basic knowledge about bash scripting, because I take NO RESPONSIBILITY of the script behavior or data loss it can do.
So, basically it is simple. It runs like this:
1. On old ROM type: sbackup -backup
2. Flash your ROM
3. On new rom type: sbackup -restore
Just like that. The applications data is tar'ed in one file per application so if you want to get rid of any, just delete it from backup directory. The directory name is same as script name on sdcard but you can change it adding a parameter without a '-' sign at runtime (first non-option parameter is treated as backup directory path). The file is zipped because this forum disallows files without an extension so... it is zipped ;D
It was tested on my fresh LeeDroid 3.3.3 GB AFTER i installed some apps. I backed them up and then restored. All seems to be perfect right now, but I will test it more thoroghly very soon because I'm planninig to have CM7 based ROM too just to choose that I need Sense or not (two nandroids for fast switch weekly ;P).
With this script and MyBackup functionality of backing up contacts, sms, history and similar it should be quite complete approach to restore all the data needed on the fresh ROM. In the future maybe I will look at the MyBackup part too. Maybe.
Feel free to comment, use, suggest or anything you like, and have fun ;P.
How do I run this script? Do i run it from sdcard or from system /bin? When i do it from system bin it says cannot create directory. When i run it from sdcard/sbackup it says permissions denied?
Sent from my ADR6400L using Tapatalk
jgrimberg1979 said:
How do I run this script? Do i run it from sdcard or from system /bin? When i do it from system bin it says cannot create directory. When i run it from sdcard/sbackup it says permissions denied?
Sent from my ADR6400L using Tapatalk
Click to expand...
Click to collapse
And thats why I mentioned in topic about not being a newbie (and I meant not forum newbie but more a linux newbie). The thing is, it's a simple script - without any user-proof capabilities, comments inside or something BUT...
But ok, I will try to help you run it. First of all, you have to set permissions to the script. It has to have executable permission to be run by the system (and I mean filesystem permission). This can be done by chmod instruction of busybox. Most of the times it's done like this:
chmod 755 filename
This is a reason of not running form sdcard if your sdcard is NOT ext filesystem (it is usually windows fat filesystem not to generate problems with reading it under windows).
Second thing to run is to have /system/bin/bash because first line of the script (a comment like this: #!/system/bin/bash) instructs busybox to execute script using bash. This can be simply changed by modifying this line, but you have to remember that changing the shell executing script have consequences. Differens shells have sometimes different syntax, althoght i wrote this script simply so it should run on most of them, especially sh.
Third thing is to have write permissions to the directory in which the backup will be created. In original version of the script it is /sdcard, because backup is made in /sdcard/sbackup. So, you have to check it (second error - problems with creating directory).
And a last tip - it can be run from ANYWHERE. Even if your partition does not alolow executing, you can do it like this:
bash-3.2# /sdcard/test
bash: /sdcard/test: /system/bin/bash: bad interpreter: Permission denied
bash-3.2# . /sdcard/test
OK
bash-3.2#
First try does not succeded, but second did. The trick is a dot which means to execute file with a shell not caring about why or permissions.
And thats most simple introduction I could write. It applies to ANY script you want to run.
Please anyone - if you want me to help, paste your results here because without a precise error message it can be very hard to deduce what caused for example permission denial or anything usual.
For now, I won't add any more error handling, but if there will be more users caring about, I will add it.

(OUTDATED) Nook HD+ root, modified 2/15/13 RIP

THIS METHOD IS NO LONGER WORKS as of update version 2.0.5 and higher.
Please visit this thread instead for the current rooting method.
Posting in this thread will get you nowhere, let it RIP.
ANNOUNCEMENT:
If you have a new Nook HD/HD+ and want to root and get the GAPPS running, you should follow the guide at the All-in-One thread instead. That said, I won't copy all the information here to there, so you should continue to read on.
Let me start by saying that I didn't come up with the working root method. The original root instruction came from verygreen in this thread. And I am not a developer, I merely have a few linux background and even less so in the Android. I worked on this on my spare time by myself.
I merely take what was working, but unusable to make it usable. I found something that he is missed. This may actually be working on Nook HD (non-plus) also, but since I don't own one I can't say that it will.
Disclaimer:
If something gone wrong, it's all your fault. I take ZERO responsibility for what happen to your device, your life, your wife/husband, your kids, your unborn child and etc. You get the idea.
Background:
When I found out the root doesn't actually work past a reboot, I start looking what actually cause the Nook to be pissed and factory reset itself. Well, it seem that the /system and anything in there is basically coming from a /dev/block/mmcblk0p8 And if something got change, Nook get pissed and do a FULL FACTORY RESET(I'll explain in a moment). Well, at least I start investigated under that idea.
What I found:
What I found, or at least what I think I found is that, probably just adding file, or increase in the size(maybe there is a threshold for this), will cause it to do a full factory reset. What I also found is that there is a $PATH for /system/sbin but not pointing to anywhere. So I come up with the idea of making another ext4 file system in a file and loop mount it to /system/sbin I guess that work(very well). What I also found is that, there are two kind of factory resets. The one that you perform yourself, which is actually not a full factory reset and the one that Nook get pissed and do the full one.
A factory reset that you perform yourself, whether from the GUI or button combination will basically clean the partition /data while a full blown one will basically restore other partition such as /system
What is included:
basically a zip file, inside that zip file are 6 files.
boot_complete_hook.sh.bak this is basically a modified version of verygreen's
busybox & su are basically from his thread
superuser.apk well I found this one floating around and seem like a good idea to stick it in there (not even sure if it gonna work w/ Nook)
makeroot.bat this is basically what do most of the work. It's base on verygreen original rooting instruction.
sbin_mount This is basically an ext4 file system which have su and another version of busybox all setup nice and tidy for you all. This version of busybox is 1.20.2r2 which I grabbed from here.
Prerequisite:
ADB, it's your responsibility to have adb up and running, meaning not just have it install, but it can see your nook also.
leapinlar wrote a post to help you getting ADB to work here.
Now to get root:
all you have to do is unzip it and run makeroot.bat (obviously you run this in windows command prompt). Yub that's all. The batch file will do the rest, including reboot the nook and wait for it to reboot and stuff. Won't make a coffee for you though.
The manual and hard way:
well, I will only explain this in a summarize way. Basically this start with verygreen rooting method. It basically take advantage of the exploit and run /data/boot_complete_hook.sh which you adb push yourself(with correct permission) with root privilege. What you can run in there is basically up to your creativity. So obviously in this case, you mount the sbin_mount as an ext4 filesystem in the /system/sbin You can make this file yourself if you want to, in linux using dd and mkfs command. Basically using dd to create a file volume to the size you want and mkfs to format it to ext4. Mount it and start uploading stuff you want in there. You will have to correct all the file permission as well. Since all of this will be mounted to /system/sbin you should be aware what you gonna put in there. I guess I could make this thing 100MB, but for this specific purpose 10MB is enough. I my case, just the su and busybox and the symbolic links for the busybox. I'm doing this for the long term. I'm too lazy to point to busybox everytime I wanna do something.
What to do afterward:
Now that you have root, you can Enable Unknown Source to allow you to install app from within the device and install GAPPS. Follow the two guides below if you interested.
Enable Unknown Source: Again, I make an easy little tool for you here.
GAPPS: here.
Did I missed something:
Well, as I said I'm no coder so if I didn't do a clean job, you can refine it. If I didn't document or give proper credit, then I guess I missed that. Sorry about that, again I'm no coder and never done this. And finally:
If this thing work for you, feel free to hit that "THANKS" button. I spent many hours trying to come up with this solution.
FAQ:
Q: My so and so application when attempting to have root access get freeze up, or superuser doesn't work?
A: Well, I'm not sure if this is dued to how the Nook side-loading work or not, but it seem for some reason superuser won't start by itself. So you have to start it manually the first time.
Q: I type in "adb root" and I can't get in as root, it doesn't work?
A: yes it does, it's just not working with adb root. You can get in via "adb shell" once you get in, type in "su" and you can see that you now should have root access.
Thank you so much! This works perfectly. Survives reboot.
here's the Linux version.
Thanks someone0 for getting this started.
Haven't fully tested the linux version, but it loads and starts up, so should work.
extract, and open up terminal and navigate to the dir you extracted to, and type
./makeroot.sh and then enter.
This sounds like a good idea initially.
It is true that the B&N does not just check for /system/xbin/su directly like they did in the past.
This time they check for something else and I just had no time to look into it more deeply to find out what is it they are actually checking for. I plan to figure this out on Friday when I am back home.
Also wanted to tell you that having Linux background is a great thing when tinkering with Android (at a low level, anyway). I don't have much Android background to speak of as well.
This works really well, and thanks to Someone (and mad props too) for getting persistent root working on this.
I may be being very naive, but my suspicion on the reboot is around the manifest file that's present at root.
It seems to be generated by the boot process and it might provide a quick and dirty list of what's permitted on the device to check. With persistent root, lots of investigation becomes a lot less painful. I expect that by end of day we'll have install unsigned running.
Early in my experimenting with the HD+, I noted:
- some versions of the Google Services Framework can be installed via adb
- when I launched the native calendar app after installing gsf, it wanted to sync to a google account, and was able to add the google account
- one version of the Play store installed and launched as far as throwing the 'you must accept the terms of service' before crashing
What BN most likely does is calculating the hash value (or digest, if you prefer) of certain system files that they think shouldn't be tampered with, then during reboot, the values of these files must match, or they will do a factory reset.
The key point is to find out where they do these checks and fool the check.
This sound simple but it depends on how they implement it. If they use binary decisions (like if the hash_value == calculated), then it is easy to get around. If not (e.g. using white box algorithm to hide keys), then it get more complicated.
excellent and very elegant solution. Kudos!
I'm heading out to work, and if you think your theory is right, try poking around with it. Now that your have root, you can try to dd those bootloading partitions out to user area and upload them out to PC and inspect them.
looking at the vold.fstab
Code:
xloader -> /dev/block/mmcblk0p1
bootloader -> /dev/block/mmcblk0p2
recovery -> /dev/block/mmcblk0p3
boot -> /dev/block/mmcblk0p4
rom -> /dev/block/mmcblk0p5
bootdata -> /dev/block/mmcblk0p6
factory -> /dev/block/mmcblk0p7
system -> /dev/block/mmcblk0p8
cache -> /dev/block/mmcblk0p9
userdata -> /dev/block/mmcblk0p10
Be extra careful when touching those partition if you not sure, don't touch them. But making a block copy of them and taking them out should be relatively easy and safe. Obviously you gonna need a Linux box to do this. I setup a VM on one of my PC last night because I need to get a ext4 partition and put all the goodies in there.
krylon360 said:
here's the Linux version.
Thanks someone0 for getting this started.
Haven't fully tested the linux version, but it loads and starts up, so should work.
extract, and open up terminal and navigate to the dir you extracted to, and type
./makeroot.sh and then enter.
Click to expand...
Click to collapse
Just wonder why do use a zip file for the linux version? Wouldn't this kinda messup the permission when compress/uncompress? meaning, makeroot.sh may not have the proper permission when unzip. Please double check.
someone0 said:
Just wonder why do use a zip file for the linux version? Wouldn't this kinda messup the permission when compress/uncompress? meaning, makeroot.sh may not have the proper permission when unzip. Please double check.
Click to expand...
Click to collapse
works just fine.
I chmod a+x'd the script before putting it into the zip.
heh, yeah, it works. Forgot I had my touchpad pluged in and it rebooted it....
whoops.
thanks for posting the location of the /recovery partition. I want to put a copy of htat on ice to prevent BN from undoing any of my work in a future update - I may want some of the fixes they have, but I want to be able to roll them back if needed.
Someone0 are you around can you pm me, Your root works, I installed nook color tools ver .02 in system/app folder and was able to see it in my sideloaded launcher, was able to uncheck/check install non market apps which sets the setting for US to be able to install .apk files from the nook itself, ONLY ISSUE is since I put that file in the system/app folder and the nook didnt like it I got stuck in a bootloop and get to start this process all over again! (nook resetted to ground zero)
maybe we temporary can leave it there get us the permission to install non market apps then remove the file and we will be ok or maybe stuck in another bootloop.
---------- Post added at 09:20 PM ---------- Previous post was at 08:52 PM ----------
GOT IT WORKING NOW:
1. Once rooted, get a file manager with root support and enable read/write permission to /system
2. temporary copy nook tools ver .02 .apk to the system/app folder
3. have a sideloaded launcher and check the app drawer youll see nook tools, run it, first screen uncheck and check the install non market apps box couple of times make sure its checked afterwards
4. have a test .apk to run the BN installer on and see you can now install .apks from the NOOK HD and HD+
5. remove the nook tools.apk file from the system/app folder and quit your file explorer which should reset everything for the system folder back to the way it orginally is!
6. reboot, if you reboot successfully with no boot loop 8 times, your GOLDEN FOR NOW! once again load up a file manager go select an .apk file and see you can now install it! Next step is trying to get amazon market working! then google somehow, but for google you need files in system/app folder permanently!
7. YOU CAN NOW SUCCESSFULLY DOWNLOAD .APK FILES through web, email, any other app and install through the NOOK HD or HD+ BN installer for .apk files. Watch what you install, if it gets put into /system or /system/app folder DREADED BOOT LOOP which resets everything! AMAZON MARKET WORKS!!!! and apps from there install fine to the BUILT IN MEMORY.
** Hopefully amazon market dont install stuff to the system/app folder and if it does hopefully you do not get the dreaded boot loops where you got to start this whole process over again so be forwarned!!! you will loose all data on NOOK HD and HD+ if u get stuck in the bootloops! BACKUP STUFF before messing with root and this kind of thing! DEVELOPMENT!
Aside from moving the actual apk to /system/app/ temporary (since you only do it once), putting a symbolic link there may work also without creating a reset loop. But can't you just side load the apk and run it in other folder?
someone0 said:
Aside from moving the actual apk to /system/app/ temporary (since you only do it once), putting a symbolic link there may work also without creating a reset loop. But can't you just side load the apk and run it in other folder?
Click to expand...
Click to collapse
when you sidelaod it OR install or have it installed to another folder or ran from another folder it cant modify the setting to allow non market apps to install!!
has to be in the /system/app folder THEN RAN from app drawer then you can set the setting uncheck and check box quit program and for now YOU HAVE to remove the .apk from the system/app folder and then you can reboot and the setting sticks! I GOT AMAZON MARKET INSTALLED right now installing apps! NOW WE GOT A KINDLE ladys and gentleman!
Amazon apk installs in internal memory. Apps downloaded from Amazon get installed in internal memory. You can then move them to SD card or leave them in internal memory. System apps are provided in the ROMs by the developers or vendors. ALWAYS back up before making system changes.. Now rooted - use Titanium Backup. System/app should be static throughout ROM lifecycle unless modified by user.
skyhawk21 said:
7. YOU CAN NOW SUCCESSFULLY DOWNLOAD .APK FILES through web, email, any other app and install through the NOOK HD or HD+ BN installer for .apk files. Watch what you install, if it gets put into /system or /system/app folder DREADED BOOT LOOP which resets everything! AMAZON MARKET WORKS!!!! and apps from there install fine to the BUILT IN MEMORY.
** Hopefully amazon market dont install stuff to the system/app folder and if it does hopefully you do not get the dreaded boot loops where you got to start this whole process over again so be forwarned!!! you will loose all data on NOOK HD and HD+ if u get stuck in the bootloops! BACKUP STUFF before messing with root and this kind of thing! DEVELOPMENT!
Click to expand...
Click to collapse
This is why I put the /system back to ro, at least that is what I think I did.
Amazon Store working on ROOTED Nook HD
Proof of Concept:
http://youtu.be/wCyd730L74Y
skyhawk21 said:
Proof of Concept:
http://youtu.be/wCyd730L74Y
Click to expand...
Click to collapse
LOL, your internet is slow. Could have cut the video time by 1/2 if not 2/3 if you switch to faster ISP.
skyhawk21 said:
Someone0 are you around can you pm me, Your root works, I installed nook color tools ver .02 in system/app folder
Click to expand...
Click to collapse
What exactly did you install? I cannot find "nook color tools" in Google Play or on APKTOP. Thanks for your hard work!
NEVERMIND! I found the thread that has the link for the app: http://forum.xda-developers.com/showthread.php?t=868366 Thanks again.
does this root method work on Nook HD+2.0.2?
if not how I can downgrade to 2.0.0?

Flashing Now Fails

I've been flashing N7 with no issues as recently as over the weekend. Today I tried to flash a new ROM and it failed. Tried a second, different ROM, same result. Do not know what I did. Any thoughts?
Error log would help greatly.
How do I get/generate the log? Haven't had to do it before.
Thanks,
Paul
The logs= errors displayed on the screen provided by the interface you use to flash the rom (recovery, computer...)
Does this help any?
TWRP V2.4.4.0
Updating partition details
E: Unable to open zip file
Error flashing zop
Updating partition details...
do I need to create a partition? Never get more details despite the tease.
Thanks,
First -
Try and download a different (NEWER) TWRP. Re-flash TWRP. Try again
or
Have you tried completely wiping the device? And pushing a ROM from ADB or using a USB OTG and Memory stick?
I had issues with my nexus becoming VERY unstable. Leading to issues.
I completely, and I mean completely, wiped. To the point that all that device basically had was a recovery, and a bootloader.
I proceeded to flash again, BOOM all fixed up.
Is there a new TWRP?
I did a factory restore after wiping everything thing, if that is what you mean?
It was working as expected last week, don't know what I did to screw it up
Boot recovery try the operation, choose advanced then copy log to sdcard. The paste the log results.
sent via electromagnetic radiation.
ibsk8 said:
Boot recovery try the operation, choose advanced then copy log to sdcard. The paste the log results.
sent via electromagnetic radiation.
Click to expand...
Click to collapse
Did this, and it said it copied but I am unable to locate it. It says 0\media\data But that folder structure doesn't exist, at least according to file expert
Will a complete wipe/restore create a partition?
pmgreen said:
Will a complete wipe/restore create a partition?
Click to expand...
Click to collapse
None of the instructions currently found in this forum alters the partitioning of the N7. Not fastboot & not the custom recovery, either.
You are chasing a red herring I think. That message you see is about the recovery performing a scan to check to see if there is a change in file systems (or partitioning of external devices) ... which might have occurred in preceding (custom recovery) operations, but didn't in this particular case.
pmgreen said:
Does this help any?
TWRP V2.4.4.0
Updating partition details
E: Unable to open zip file
Error flashing zop
Updating partition details...
Click to expand...
Click to collapse
Focus your efforts here; it certainly looks like a first-order problem.
bftb0 said:
None of the instructions currently found in this forum alters the partitioning of the N7. Not fastboot & not the custom recovery, either.
You are chasing a red herring I think. That message you see is about the recovery performing a scan to check to see if there is a change in file systems (or partitioning of external devices) ... which might have occurred in preceding (custom recovery) operations, but didn't in this particular case.
Focus your efforts here; it certainly looks like a first-order problem.
Click to expand...
Click to collapse
Think reinstalling TWRP would help? It was working fine so I'm a bit stumped what changed and why
pmgreen said:
Think reinstalling TWRP would help? It was working fine so I'm a bit stumped what changed and why
Click to expand...
Click to collapse
You can also soft-boot a recovery without actually flashing it, e.g.
Code:
fastboot boot custom-recovery.img
I suppose you could then poke around and see if it is having troubles mounting any of the normal partitions (/data, /system, or /cache). Look in the kernel boot log of the recovery (cat /proc/kmsg or "dmesg") to see if anything looks strange, etc.
There have been a couple of reports from folks who developed problems that looked like eMMC flash media errors - loss of partitions, failure to mount /data, et cetera. At the moment though, your symptoms are very generic and non-specific, as in "it doesn't boot".
I suppose you saw no errors at all reported on the screen during that stock-install-via-fastboot procedure?
bftb0 said:
You can also soft-boot a recovery without actually flashing it, e.g.
Code:
fastboot boot custom-recovery.img
I suppose you could then poke around and see if it is having troubles mounting any of the normal partitions (/data, /system, or /cache). Look in the kernel boot log of the recovery (cat /proc/kmsg or "dmesg") to see if anything looks strange, etc.
There have been a couple of reports from folks who developed problems that looked like eMMC flash media errors - loss of partitions, failure to mount /data, et cetera. At the moment though, your symptoms are very generic and non-specific, as in "it doesn't boot".
I suppose you saw no errors at all reported on the screen during that stock-install-via-fastboot procedure?
Click to expand...
Click to collapse
The only error is that it can't open the zip. I've tried downgraded TWRP, then upgrading back. Tried flashing the existing rom.
Nothing has worked. The N7 is functional, just will not allow me to flash
pmgreen said:
The only error is that it can't open the zip. I've tried downgraded TWRP, then upgrading back. Tried flashing the existing rom.
Nothing has worked. The N7 is functional, just will not allow me to flash
Click to expand...
Click to collapse
Well, if the source material can't be opened, then there is nothing to be flashed.
So maybe it is better to call this a "can't open files" problem instead of a "can't flash" problem.
Are there any special characters in the file name ... or spaces? If so, try renaming the file so the name only contains [a-z], [A-Z], [0-9] plus dash, underscore, and dot.
The other thing that can happen is if you drop a file in /data/media/0 as the root user, it will show up under /sdcard, but can't be read by non-privileged users via the /sdcard/ path. I'm not sure what the exact details are here - much less why this would effect the recovery (as you would expect everything to be running as root there) - but you can detect this problem by using a terminal emulator, and looking for differences in ownership or file permission:
Code:
$ su
# cd /data/media/0
# ls -ld *
use chown and chmod as appropriate to fix files as needed
bftb0 said:
Well, if the source material can't be opened, then there is nothing to be flashed.
So maybe it is better to call this a "can't open files" problem instead of a "can't flash" problem.
Are there any special characters in the file name ... or spaces? If so, try renaming the file so the name only contains [a-z], [A-Z], [0-9] plus dash, underscore, and dot.
The other thing that can happen is if you drop a file in /data/media/0 as the root user, it will show up under /sdcard, but can't be read by non-privileged users via the /sdcard/ path. I'm not sure what the exact details are here - much less why this would effect the recovery (as you would expect everything to be running as root there) - but you can detect this problem by using a terminal emulator, and looking for differences in ownership or file permission:
Code:
$ such
# cd /data/media/0
# ls -ld *
use chown and chmod as appropriate to fix files as needed
Click to expand...
Click to collapse
Thanks bftb, you are correct it's a can't open zip. No error than fail and it can't open the zip. It says updating partition but nothing changes
The file names are from the developers, once of which I recently successfully flashed. Tried coping the log to the SD card, but unable to find /data/media/0. Do I need to recreate a partition?
(FYI there was an auto-correct typo in my prior post - "su" not "such". Derp)
pmgreen said:
Do I need to recreate a partition?
Click to expand...
Click to collapse
No. (There is no way to do that with the tools we have anyway)
Unless what you mean by "recreate" is rebuild/reinitialize a filesystem in a partition - that's a possibility.
You need to try and figure out why you can't read files.
As a workaround, you can put files on a USB key (FAT formatted, not NTFS) and using TWRP access them by putting the USB key on the other end of a OTG cable.
Your posts are a bit vague - I can't even tell if you have tried other ROM files, whether you checked them to see if they are the correct size/checksum, etc.
pmgreen said:
Tried coping the log to the SD card, but ...
Click to expand...
Click to collapse
At this point, your best approach is still to follow the initial advice of 'ibsk8'. Look in the log file for any further details about errors that occurred.
The logs are typically in /cache/recovery/ or (while the custom recovery is running) in /tmp
Use "adb pull" to get the log file to your PC and have a look at it. If you can't find anything obvious in there, then cut-n-paste the file to http://pastebin.com and provide the link to us.
bftb0 said:
At this point, your best approach is still to follow the initial advice of 'ibsk8'. Look in the log file for any further details about errors that occurred.
The logs are typically in /cache/recovery/ or (while the custom recovery is running) in /tmp
Use "adb pull" to get the log file to your PC and have a look at it. If you can't find anything obvious in there, then cut-n-paste the file to http://pastebin.com and provide the link to us.
Click to expand...
Click to collapse
I am not familiar using ADB pull. Tried using a root file manager to access the log but don't see.
Greatly appreciate your help, let me know what other info I should paste.
Thanks,

NST sleep but retain last screen image

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.

[MOD][SCRIPT] Get More Storage by Relocating Dalvik Cache!

DISCLAIMER: YOU AGREE TO TAKE FULL RESPONSIBILITY FOR YOUR DEVICE IF YOU PROCEED.
The original thread (http://forum.xda-developers.com/moto-g/general/mod-save-data-space-cache-partition-t2942765) was getting to cluttered up with development and testing so I decided to start a new thread with the "finished" product. The original thread will be renamed to Q&A/Development. We might even ask for the old thread to be closed down. (up to @Bert98, the thread's creator.)
Moto G's internal eMMC card has a ~600Mb partition called /cache, which is not used since the apps' cache is stored in /data, so the latter fills up and the first one stays empty.
Owning a 8Gb model, having 600Mb not available for storage really bugged me, because my phone's memory (/data partition) was always full because it's a 5.7Gb space shared between apps and microSD files.
Now, it may not work for you if:
a) you have A LOT of apps installed.
And by "a lot", I mean more than 90-100 apps, but if you have a 8Gb model, you probably don't
b) you're running ART (this is default in lollipop and newer)
Since ART uses a lot more space than dalvik, the space in the /cache partition probably won't be enough. When I was running ART, it used 1Gb more than dalvik.
Original post by @Bert98
Click to expand...
Click to collapse
This was tested on my moto g 16GB which is running RetailUS_4.4.4 kitkat with CWM recovery. The custom ROM procedure was tested on the same phone but with cm11 Nightly installed.
Prerequisites:
1. You must have "adb root" functioning. If you don't head to this thread: http://forum.xda-developers.com/showthread.php?t=1687590 and there is a free download link at the bottom of the post.
Download and install the apk on your phone. Open up adbd insecure (the new app) and grant it superuser rights PERMANENTLY. Check the box that says "enable insecure binary" and make sure to check the box
that says "enable at boot."
2. You must have a recovery that can accept adb shell commands.
3. Root Access Duh?!
4. A windows machine capable of running batch files.
5. A decent text editor, notepad will work but notepad++ is strongly recommended. (Only needed if you are using STOCK ROM procedure)
Please, please make a nandroid backup before you continue!!!!
Stock ROM procedure:
Read the directions very carefully and then read them again, before continuing.
1. Download the cachemover_v1.3.zip from: LINK REMOVED DUE TO SCRIPT ISSUES.
2. Extract the contents.
3. Connect device to PC and navigate to the extracted folder.
4. Double click/Run the cachemover_Stock.bat
5. Follow the onscreen instructions until you get to the part where it says to edit a file.
6. About halfway through the script it will pull a file called "init.qcom.post_boot.sh" to the folder.
7. Open it with a TEXT editor and navigate to about line 487 (Might be different for 8gb model). Look here for a better understanding: https://www.dropbox.com/s/jr5lyl5s5i2jtpg/where to paste code.PNG?dl=0
8. Start a new line and paste this code in the file: (Refer to the image above for help)
Code:
chmod 655 /cache
chmod 655 /cache/dalvik-cache
chmod 655 /cache/dalvik-cache/*
9. Make sure to save the file in the same folder as the cachemover_Stock.bat
10. Press any key to continue on the script and let it do its thing.
11. It will reboot several times and land you on the home screen/lock screen.
12. If the script hangs after a reboot, you need to unlock the device to reestablish a connection with your computer.
13. There might be one or two force closes but once you close the notifications they will not come back.
Custom ROM procedure:
USE THIS FOR ROMS THAT DO NOT REMOUNT OR CHANGE PERMISSIONS OF /CACHE ON BOOT
1. Download the cachemover_v1.3.zip from: https://www.dropbox.com/s/bzj34g4q1s61ojz/cachemover_v1.3.zip?dl=0
2. Extract the contents.
3. Connect device to PC and navigate to the extracted folder.
4. Double click/Run the cachemover.bat
5. Follow the onscreen instructions.
If anything goes wrong:
Go to recovery, wipe cache, then wipe dalvik-cache and reboot. This should get your device back to how it was.
(If you used STOCK ROM procedure)
The script made a backup of the "init.qcom.post_boot.sh" file to /sdcard/init_backup
You can restore the shell script to /system/etc/ via shell commands or by using a root browser. To restore permissions:
Code:
chmod 740 /system/etc/init.qcom.post_boot.sh
chown root:root /system/etc/init.qcom.post_boot.sh
Custom ROM procedure already has a restore script!
I am currently working on an auto restore script for stock and that will be relased soon, hopefully! :good:
Changelog:
v1.0 - First stable release. Does not work on STOCK ROM.
v1.1 - Added a restore script.
v1.3 - Added support for STOCK ROM. There are still a few bugs.
How it works?!?!
Coming soon...
Huge thanks to @Bert98 and @dd043
Hit the thanks button if it worked! I went through about 50 factory resets, and reflashed the ROM about 25 times, and put about 10 hours of work into this script! Really motivates me for future projects. :laugh:
Thanks for your help man and effort.
I encountered a problem, everything works up until my device boots in CWM to fix permissions, then just sits there doing not alot I don't even see the option in my CWM.
Any ideas? cheers
Sent from my XT1032 using XDA Free mobile app
When it reboots to cwm unplug the cable and replug it, if it hangs just type these commands manually from a command window.
chmod 655 /cache
chmod 655 /cache/dalvik-cache
chmod 655 /cache/dalvik-cache/*
reboot
If this does not work you may ned to go into mounts & storage in the cwm menu and click mount /cache. Then try the commands again.
I'm having some issues on stock.
I thought 0655 fixed everything but no, I can't install any app after moving the dalvik-cache to /cache. I tried chmoding 0777 on the new cache folder, on /cache itself, to no avail.
Code:
E/dexopt cannot open '/data/dalvik-cache/[email protected]' for output
Anyone can confirm it's not only my device? And/or can help find a fix?
Also does someone knows how to execute commands on a particular init step? Real init.rc scripts can do:
Code:
on post-fs-data
mount -o bind /cache/dalvik /data/dalvik-cache
It there was a way to achieve the same from post_boot/init.d we could mount -o bind /cache/dalvik /data/dalvik-cache and all permissions issues would disappear as well as the need for symlink.
You have a typo in the threads title. Just a heads up.
Vuciz said:
You have a typo in the threads title. Just a heads up.
Click to expand...
Click to collapse
Thanks for letting me know!
dd043 said:
I'm having some issues on stock.
I thought 0655 fixed everything but no, I can't install any app after moving the dalvik-cache to /cache. I tried chmoding 0777 on the new cache folder, on /cache itself, to no avail.
Code:
E/dexopt cannot open '/data/dalvik-cache/[email protected]' for output
Anyone can confirm it's not only my device? And/or can help find a fix?
Also does someone knows how to execute commands on a particular init step? Real init.rc scripts can do:
Code:
on post-fs-data
mount -o bind /cache/dalvik /data/dalvik-cache
It there was a way to achieve the same from post_boot/init.d we could mount -o bind /cache/dalvik /data/dalvik-cache and all permissions issues would disappear as well as the need for symlink.
Click to expand...
Click to collapse
Let me try and do that right now... Ill get back to you if it does!
My script works on stock btw... But the mount way seems a bit easier and might cause less errors than my way.
Try it please.
skyguy126 said:
Let me try and do that right now... Ill get back to you if it does!
My script works on stock btw... But the mount way seems a bit easier and might cause less errors than my way.
Try it please.
Click to expand...
Click to collapse
Yes I've tried your script, all went well but the result is the same. The script itself works nicely btw
Applications present before moving cache work perfectly, but I can't install anything new. I suspect it might be my device but before wiping everything I'd prefer feedback from others :fingers-crossed:.
I cannot install new apps as well. The mount command you showed me has the same effect too. I honestly don't know anymore, the sym link did not allow the install of new apps nor did the mount command you sent me. Correct me if I am wrong.
Edit: Going through all the init files on my phone to see which one remounts /cache at boot.
Why does the init.rc get overwritten at boot. Is it because the kernel (boot.img) is the one that copies it over? I have found by changing the perms/locations in this file and init.target.rc you can achieve what this mod is trying to acomplish.
I don't see the mount cache command in CWM strange
I've managed to get back to normal, thanks for everyone's help though, I will keep and eye on the thread
Sent from my XT1032 using XDA Free mobile app
non-windows version?
Thanks for this tool. It's a great idea and our Motos really need it.
However, I have a problem - I do not own a windows license (os x and ubuntu user) and I would prefer not to spend $120 just to use it for this script. Pirating is out of the question for me.
I was wondering if there is any chance of having this script written for linux and/or mac. If impossible, is there a LEGAL way of running windows in a virtual machine? Something like a trial or similar?
If you know how just convert it to shell script for osx and Linux. I give you permission to do this but you may not take credit or rehost your creation.
Ok so I have the kernel extracted and we could modify and flash that, but I believe that it's not really necessary. There are a lot of risks to flashing kernels and I am not willing to take it. So is there a way we can modify dalvik so it creates it's cache in /cache instead.
skyguy126 said:
Why does the init.rc get overwritten at boot. Is it because the kernel (boot.img) is the one that copies it over? I have found by changing the perms/locations in this file and init.target.rc you can achieve what this mod is trying to acomplish.
Click to expand...
Click to collapse
Yes the init.rc is in the boot ramdisk. I don't think it would be worth the trouble to rebuild a boot.img. The moto g is fairly unbrickable but it's quite a lot of work to setup an environment to rebuild an image :/.
Too bad for the mount command, I was sure it was working but maybe I had changed something else and don't quite remember the steps to reproduce
We could possibly implement a shell script toggler for when we need to install new apps, but I'm afraid it'd become annoying fairly quickly: I noticed the issue initially because google play services decided to update itself, failed, and broke all google apps. As far as I know this autoupate can't be disabled.
Thanks for trying!
dd043 said:
Yes the init.rc is in the boot ramdisk. I don't think it would be worth the trouble to rebuild a boot.img. The moto g is fairly unbrickable but it's quite a lot of work to setup an environment to rebuild an image :/.
Too bad for the mount command, I was sure it was working but maybe I had changed something else and don't quite remember the steps to reproduce
We could possibly implement a shell script toggler for when we need to install new apps, but I'm afraid it'd become annoying fairly quickly: I noticed the issue initially because google play services decided to update itself, failed, and broke all google apps. As far as I know this autoupate can't be disabled.
Thanks for trying!
Click to expand...
Click to collapse
How about making a simple apk that toggles this feature. Something like when you click the icon it doesn't even open but gives a little notification of success. Something like that. I myself am not experienced with apks but I can put together a shell script for the apk.
skyguy126 said:
Ok so I have the kernel extracted and we could modify and flash that, but I believe that it's not really necessary. There are a lot of risks to flashing kernels and I am not willing to take it. So is there a way we can modify dalvik so it creates it's cache in /cache instead.
Click to expand...
Click to collapse
Patching dalvik itself sounds promising. It can probably be done with in a batch script with a command line hex editor.
The path is defined in frameworks/base/cmds/installd/installd.h
Code:
#define DALVIK_CACHE_PREFIX "/data/dalvik-cache/"
Not sure if there is another mention in the source tree.
But there's nothing to say we wouldn't face the same issue, the error message in the logcat is pretty generic
dd043 said:
Patching dalvik itself sounds promising. It can probably be done with in a batch script with a command line hex editor.
The path is defined in frameworks/base/cmds/installd/installd.h
Code:
#define DALVIK_CACHE_PREFIX "/data/dalvik-cache/"
Not sure if there is another mention in the source tree.
But there's nothing to say we wouldn't face the same issue, the error message in the logcat is pretty generic
Click to expand...
Click to collapse
Ill try it. I don't mind doing a bunch of resets because I am using my moto g as a test bench anyway. My daily driver is the OnePlus One
dd043 said:
Patching dalvik itself sounds promising. It can probably be done with in a batch script with a command line hex editor.
The path is defined in frameworks/base/cmds/installd/installd.h
Code:
#define DALVIK_CACHE_PREFIX "/data/dalvik-cache/"
Not sure if there is another mention in the source tree.
But there's nothing to say we wouldn't face the same issue, the error message in the logcat is pretty generic
Click to expand...
Click to collapse
EDIT: Unfortunately it didn't work. I don't know if I modified the installd file correctly. The program I used is HxD.
Is there a way we can force dalvik to start after the directories are created. And change dalvik to create it in /cache.

Categories

Resources