[EXPLOIT] Modify System Files w/o Flashing Boot Partition - Barnes & Noble Nook Tablet

Exploit: Modify System Files w/o Flashing Boot Partition​
Background
One of the serious inconveniences of the stock Nook Tablet firmware is the inability to copy & paste in text fields. I hacked together a solution (see this thread) that requires replacing the file /system/framework/framework.jar. However, when I did replaced that file, my tablet no longer boots.
It turns out that there are two files in the ramdisk that specify (what I assume to be) checksums of system files: /manifest00 and /manifest01. B&N has added a "feature" to the /init process that checks if system files on disk match the checksums in /manifest00 and /manifest01, and will crash the system if it finds a discrepancy, resulting in a boot loop.
/manifest00 and /manifest01 cover essentially all of the system files that one would be interested to modify, including my /system/framework/framework.jar. It is possible to get around this by using a ramdisk that has an empty /manifest00 and /manifest01, because /init only checks files with a checksum listed in /manifest00 and /manifest01, and will happily ignore everything else. But this would require me to flash a new boot partition, and since the NT has a locked bootloader, I would have to use bauwks's 2nduboot or Cyanoboot.
In essence, B & N is quite clever:
1. To modify system files (/system), you need to modify the boot partition (/manifest00 and /manifest01).
2. To modify the boot partition, you need to modify the boot loader.
3. The bootloader is locked.
Of course, with bauwks's 2nduboot hack, 3 is no longer an obstacle, but I would still rather not flash and damage my boot partition, having almost bricked my tablet once by doing so.
Exploit
I studied the /manifest00 and /manifest01 in the 1.4.2 ROM on my NT 8GB and compared them with /init.rc and /init.omap4430.rc, and discovered that /init.omap4430.rc starts /system/bin/uim-sysfs with root permissions at boot, but /system/bin/uim-sysfs does not actually exist. In addition, /system/bin/uim-sysfs is not in /manifest00 or /manifest01, and is thus not verified by /init.
Upon further testing, /system/bin/uim-sysfs is run after /init checks the checksums of system files, which means that /system/bin/uim-sysfs can modify /system as it wishes, with the caveat that it must restore its modifications before a reboot lest /init catches it at it.
So I placed a shell script at /system/bin/uim-sysfs that replaces /system/framework/framework.jar with my custom build, restarts the zygote process, and restores the stock /system/framework/framework.jar. I'm now able to use copy & paste on my Nook Tablet
If anyone's interested, you can check out the uim-sysfs script I'm using for the copy & paste hack in the linked file in this thread.

Interesting and very useful for stock users. Well done!
~ Veronica

Stop it, BN. Stop it.
/init.omap4430.rc starts /system/bin/uim-sysfs with root permissions at boot, but /system/bin/uim-sysfs does not actually exist!
Click to expand...
Click to collapse
Interesting find. What is BN thinking with this manifest checking stuff. BN, just stop it. Seriously. Stop it.
Stop it, BN.
FWIW, uim-sysfs is the no-longer-used userspace side of the "shared transport" wireless daemon stuff (the other side is called "kim" in the kernel) that's used for bluetooth, FM, and gps on the 1271... it's used in CM7/CM9 (backported from 2.6.35 to 2.6.32) for nookcolor to make bluetooth work.
BN likely just modified TI's stock init.omap3.rc and left lines like the uim service as-is. Running this non-existent file as root is kinda a "security" hole, IMO, assuming the manifest verification was supposed to be some kind of security. Remove this, there will doubtlessly be other examples of the same thing.
All that said, is this script, which is replacing system files on-the-fly any more "safe" than just replacing the boot partition in the first place? Add CyanoBoot, shift current boot.img contents 512 bytes. Done.
Nice discovery tho.

fattire said:
All that said, is this script, which is replacing system files on-the-fly any more "safe" than just replacing the boot partition in the first place? Add CyanoBoot, shift current boot.img contents 512 bytes. Done.
Click to expand...
Click to collapse
Well, the only real difference for me is what happens when you screw something up. When I screwed up /system, I could always use the "8 failed reboots" method to go back to stock /system. When I screwed up my boot partition, I almost bricked my tablet and there was no way of getting back to the factory restore interface.
In addition, it's also really, really easy for development because we'd be working with simple files, not images. For my copy & paste hack, I was editing /system/bin/uim-sysfs directly on the tablet using a text editor. Boot images are much harder to work with.
The last advantage is that it's a lot less intrusive. There's no scary flashing going on here; just drop a file in /system/bin/ and you're set.

care to share the files?
jichuan89 said:
Exploit: Modify System Files w/o Flashing Boot Partition​
Background
One of the serious inconveniences of the stock Nook Tablet firmware is the inability to copy & paste in text fields. I hacked together a solution (will post details later) that requires replacing the file /system/framework/framework.jar. However, when I did replaced that file, my tablet no longer boots.
It turns out that there are two files in the ramdisk that specify (what I assume to be) checksums of system files: /manifest00 and /manifest01. B&N has added a "feature" to the /init process that checks if system files on disk match the checksums in /manifest00 and /manifest01, and will crash the system if it finds a discrepancy, resulting in a boot loop.
/manifest00 and /manifest01 cover essentially all of the system files that one would be interested to modify, including my /system/framework/framework.jar. It is possible to get around this by using a ramdisk that has an empty /manifest00 and /manifest01, because /init only checks files with a checksum listed in /manifest00 and /manifest01, and will happily ignore everything else. But this would require me to flash a new boot partition, and since the NT has a locked bootloader, I would have to use bauwks's 2nduboot or Cyanoboot.
In essence, B & N is quite clever:
1. To modify system files (/system), you need to modify the boot partition (/manifest00 and /manifest01).
2. To modify the boot partition, you need to modify the boot loader.
3. The bootloader is locked.
Of course, with bauwks's 2nduboot hack, 3 is no longer an obstacle, but I would still rather not flash and damage my boot partition.
Exploit
I studied the /manifest00 and /manifest01 in the 1.4.2 ROM on my NT 8GB and compared them with /init.rc and /init.omap4430.rc, and discovered that /init.omap4430.rc starts /system/bin/uim-sysfs with root permissions at boot, but /system/bin/uim-sysfs does not actually exist. In addition, /system/bin/uim-sysfs is not in /manifest00 or /manifest01, and is thus not verified by /init.
Upon further testing, /system/bin/uim-sysfs is run after /init checks the checksums of system files, which means that /system/bin/uim-sysfs can modify /system as it wishes, with the caveat that it must restore its modifications before a reboot lest /init catches it at it.
So I placed a shell script at /system/bin/uim-sysfs that replaces /system/framework/framework.jar with my custom build, restarts the zygote process, and restores the stock /system/framework/framework.jar. I'm now able to use copy & paste on my Nook Tablet
Click to expand...
Click to collapse
would be nice if you can share some files

MikeCh said:
would be nice if you can share some files
Click to expand...
Click to collapse
If you're interested in copy & paste, I've now posted instructions at http://forum.xda-developers.com/showthread.php?t=1534757

jichuan89 said:
Well, the only real difference for me is what happens when you screw something up. When I screwed up /system, I could always use the "8 failed reboots" method to go back to stock /system. When I screwed up my boot partition, I almost bricked my tablet and there was no way of getting back to the factory restore interface.
Click to expand...
Click to collapse
Well, "bricking" in the classic sense of creating a permanently damaged system is a bit difficult-- you can always boot from SD card and reflash from CWM, right?
In addition, it's also really, really easy for development because we'd be working with simple files, not images. For my copy & paste hack, I was editing /system/bin/uim-sysfs directly on the tablet using a text editor. Boot images are much harder to work with.
Click to expand...
Click to collapse
do you mean for the developer or end user?
The last advantage is that it's a lot less intrusive. There's no scary flashing going on here; just drop a file in /system/bin/ and you're set.
Click to expand...
Click to collapse
but aren't you still moving framework files around "on the fly"?
Well, in any event it was a good observation that can be used for all kinds of purposes-- rooting, running background processes, etc. You could even drop a cwm recovery binary in there to instantly turn stock into cwm I bet...

fattire said:
Well, "bricking" in the classic sense of creating a permanently damaged system is a bit difficult-- you can always boot from SD card and reflash from CWM, right?
Click to expand...
Click to collapse
True.
fattire said:
do you mean for the developer or end user?
Click to expand...
Click to collapse
I guess that's personal preference more than anything else. Please disregard.
fattire said:
but aren't you still moving framework files around "on the fly"?
Click to expand...
Click to collapse
Yes - but the process is automated by the script in uim-sysfs. From the user's perspective it's just copying a file to /system/bin say using ES File Explorer, rather than burning an image to an SD card and booting from it which appears to scare/confuse a lot of people. Also they wouldn't need a computer or a card reader or a spare SD card or a USB cable or any special software on their computer.

Related

Honeycomb on eMMC (updated download file to the correct one)

I Highly suggest you follow the steps in this post first (http://forum.xda-developers.com/showthread.php?t=920347)
Froyo is completely stable and will give you a back up OS in case anything happens or you want to do something that doesn't work in HC.
Steps:
If anyone knows how to shrink a partition using parted please let me know. This would eliminate steps 2 & 3
QUICK EDIT WARNING: PLEASE READ: THIS IS BASED ON THE DUAL BOOT FROM ROOKIE1. FROM WHAT I KNOW THIS DOES NOT WORK ON 1.1.0 ONLY 1.0.1
(Note: Requires adb)
1 ) Have a working honeycomb v02 sd card (v03 has a custom kernel which causes rotation issues on the eMMC).
2) Install EASEUS (Windows) or gParted (Linux)
(if you need help with this just PM me)
3) Shrink the second partition of the SD card to 400mb
4) Download and extract my zip to your android/platform-tools folder
5) Run Internal.bat
Make sure not to format your sdcard from your nook while using this.
< standard disclaimer - I'm not responsible for whatever damage you did to your NC >
Also, the reason I did not post a clockwork zip or a dd img for system is I'm unsure of the legality of it, if someone else would like to then by all means do so.
PM me for any questions, and I would like to say thanks to samuelhalff, as without his help I never would've gotten it running from internal memory
Also, please make sure you know how to recover your nook color back to stock. Not only if something goes wrong, but since honeycomb isn't fully working yet.
That being said, if you run the dual-boot script first from rookie1 you'll always be able to fall back onto froyo to fix any issues.
----------------------------------------------------------------------------
How this works:
It copies the system partition from honeycomb onto the internal memory.
It then pushes my boot.img to your sd card.
Finally it overwrites your boot.img with mine
(My boot.img contains everything from rookie1's dual boot alongside the needed jar files included on honeycombs boot.img)
Download link:
http://www.multiupload.com/0TTH2OJS3C
Uploading fixed version now
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
And for those who like doing everything manually. Here is Sam's modified uRamdisk. Make sure its on the bootpartiton alongside the jar files included in deeper-blue's release
Ramdisk: http://www.multiupload.com/90H38OX0S9
Also, the first time it starts up may take a few min. So be patient before trying to restart it
Thanks this will be very useful for myself and others. I'll report back with any issues.
Why must my laptop break today of all days?
Sent from my SPH-D700 using XDA App
marcusant said:
Why must my laptop break today of all days?
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
Sorry to hear that. I would say you could do it without one but you need the modified ramdisk inside my boot.img
Hey maybe i'm doing something wrong but i keep getting this error message:
rm failed for *, no such file or directory
i am not an expert on adb so this may be my fault, just reporting feedback for you.
tgallant21 said:
Hey maybe i'm doing something wrong but i keep getting this error message:
rm failed for *, no such file or directory
i am not an expert on adb so this may be my fault, just reporting feedback for you.
Click to expand...
Click to collapse
its not rm * its "rm * -r" as that is the recursive switch...
MattJ951 said:
I Highly suggest you follow the steps in this post first (http://forum.xda-developers.com/showthread.php?t=920347)
Froyo is completely stable and will give you a back up OS in case anything happens or you want to do something that doesn't work in HC.
Steps:
QUICK EDIT WARNING: PLEASE READ: THIS IS BASED ON THE DUAL BOOT FROM ROOKIE1. FROM WHAT I KNOW THIS DOES NOT WORK ON 1.1.0 ONLY 1.0.1
(Note: Requires adb)
1 ) Have a working honeycomb v02 sd card (v03 has a custom kernel which causes rotation issues on the eMMC).
2) Download and extract my zip to your android/platform-tools folder
3) Run Internal.bat
Make sure not to format your sdcard while using this.
Note: I'm not sure if you need to clear your data partition or not. I did, but it may not be required.
the steps under froyo would be : something similar to this (I dd'd HC data partition to the internal, so i'm not 100% sure of this)
Code:
adb shell
mount -o remount,rw /dev/block/mmcblk1 /
mkdir data_temp
mount /dev/block/mmcblk0p6 data_temp
cd /data_temp [B]MAKE SURE THIS COMMAND WORKS BEFORE CONTINUING[/B]
rm * -rf
exit
< standard disclaimer - I'm not responsible for whatever damage you did to your NC >
Also, the reason I did not post a clockwork zip or a dd img for system is I'm unsure of the legality of it, if someone else would like to then by all means do so.
PM me for any questions, and I would like to say thanks to samuelhalff, as without his help I never would've gotten it running from internal memory
Also, please make sure you know how to recover your nook color back to stock. Not only if something goes wrong, but since honeycomb isn't fully working yet.
That being said, if you run the dual-boot script first from rookie1 you'll always be able to fall back onto froyo to fix any issues.
----------------------------------------------------------------------------
How this works:
It copies the system partition from honeycomb onto the internal memory.
It then pushes my boot.img to your sd card.
Finally it overwrites your boot.img with mine
(My boot.img contains everything from rookie1's dual boot alongside the needed jar files included on honeycombs boot.img)
Click to expand...
Click to collapse
You have verified this working with your boot.img? Mine gets hampered during the boot and locks up... I had the same issue when I was building my ramdisk for this purpose.... I am going to continue to look into this and will post anything I find.
Cheers!
A quick question:
You say not to format the SDCard while using this. Does this mean that there are still some system files on the SDCard after the procedure is done or can I format my card as FAT32 once the whole operation is done?
Ooglez said:
A quick question:
You say not to format the SDCard while using this. Does this mean that there are still some system files on the SDCard after the procedure is done or can I format my card as FAT32 once the whole operation is done?
Click to expand...
Click to collapse
I believe I may have included an incorrect boot.img in my original upload, im reuploading it now.
As for formatting the sd card, i'll clairfy that in the OP. Don't format the sd card from inside the nook. formatting it inside a computer is fine.
MattJ951 said:
How this works:
It copies the system partition from honeycomb onto the internal memory.
It then pushes my boot.img to your sd card.
Finally it overwrites your boot.img with mine
(My boot.img contains everything from rookie1's dual boot <B>alongside the needed jar files included on honeycombs boot.img)</B>
Click to expand...
Click to collapse
I think I see the issue, your dd image is lacking those jar files... I am going to try and add those files to my boot partition and go from there.... Disregard! per the post above this one.......
modembug said:
I think I see the issue, your dd image is lacking those jar files... I am going to try and add those files to my boot partition and go from there.... Disregard! per the post above this one.......
Click to expand...
Click to collapse
The boot.img must be from another project I was working on. It's using the wrong u-boot.bin and is missing the jar files. Updating main post in 20 seconds once it finishes uploading
And its up.
http://www.multiupload.com/KPDAPGYXSI
Also thanks for the feedback.
MattJ951 said:
The boot.img must be from another project I was working on. It's using the wrong u-boot.bin and is missing the jar files. Updating main post in 20 seconds once it finishes uploading
And its up.
http://www.multiupload.com/KPDAPGYXSI
Click to expand...
Click to collapse
Thanks for updating so quickly. I've been waiting to run Honeycomb off of EMMC. I'll let you know how it goes.
MattJ951 said:
The boot.img must be from another project I was working on. It's using the wrong u-boot.bin and is missing the jar files. Updating main post in 20 seconds once it finishes uploading
And its up.
http://www.multiupload.com/KPDAPGYXSI
Also thanks for the feedback.
Click to expand...
Click to collapse
I am getting ready to dd that image over as we speak, i will report back shortly...
No problem, let me know if it works and if it doesn't ill try updating it again. (I personally have it working but I didn't use a script, i entered the commands manually. Also make sure youre using v02 [though note: HC runs faster for some reason if you copy the data partition from v03 and dd it to the internal while running v02's system. v03 has problems with the kernel due to the 90degrees thing deeper added]
MattJ951 said:
No problem, let me know if it works and if it doesn't ill try updating it again. (I personally have it working but I didn't use a script, i entered the commands manually. Also make sure youre using v02 [though note: HC runs faster for some reason if you copy the data partition from v03 and dd it to the internal while running v02's system. v03 has problems with the kernel due to the 90degrees thing deeper added]
Click to expand...
Click to collapse
I am having issues with it locking up on "Android _ " could be due to crap on the data partition from the last boot.img... cleaning it off and trying again. Yeah I took a look at your bat file and just ran things manually... i have issues with unknown bat/sh files lol
UPDATE: okay, so its still locking up... did you dd the data partition or any of that stuff over as well? as of right now, i am running your boot.img and i DD'd the system partition from a working HC-SD, and i removed all files from the internal /data partition....
modembug said:
I am having issues with it locking up on "Android _ " could be due to crap on the data partition from the last boot.img... cleaning it off and trying again. Yeah I took a look at your bat file and just ran things manually... i have issues with unknown bat/sh files lol
Click to expand...
Click to collapse
Let me know if it works. The "Android _" screen originally locked up for me because of the uRamdisk. I'll upload the one Sam sent me which is included in the boot.img but maybe is causing problems for you.
The modified uRamdisk is now in the OP.
Nada, still no dice.... I have all the folders from HC /Boot with your boot files replacing uboot, uramdisk etc.. Still running into the same issue, might need to work busybox into this thing to see what is going on...
UPDATE: going to try dd'ing the /data part over to emmc /data..
modembug said:
Nada, still no dice.... I have all the folders from HC /Boot with your boot files replacing uboot, uramdisk etc.. Still running into the same issue, might need to work busybox into this thing to see what is going on...
UPDATE: going to try dd'ing the /data part over to emmc /data..
Click to expand...
Click to collapse
Thats not the problem. I realized my mistake.
where i wrote
adb shell dd if=/dev/block/mmcblk0p5 of=/dev/block/mmcblk1p1
it should be
adb shell dd if=/dev/block/mmcblk0p5 of=/dev/block/mmcblk1p2
if you run that it should boot correctly.
uploading a fixed version to the OP now
MattJ951 said:
Thats not the problem. I realized my mistake.
where i wrote
adb shell dd if=/dev/block/mmcblk0p5 of=/dev/block/mmcblk1p1
it should be
adb shell dd if=/dev/block/mmcblk0p5 of=/dev/block/mmcblk1p2
if you run that it should boot correctly.
uploading a fixed version to the OP now
Click to expand...
Click to collapse
which is why i run commands manually ;-) yeah I double check prior to DD and i have pushed the correct partition to /system... i have now pushed /data over and still no love... Can you dd your /boot and post it?
modembug said:
which is why i run commands manually ;-) yeah I double check prior to DD and i have pushed the correct partition to /system... i have now pushed /data over and still no love... Can you dd your /boot and post it?
Click to expand...
Click to collapse
That actually is my current /boot inside the 7z. Also i can't think of a reason why it wouldn't work.
I'll format my NookColor and try it to see if I can figure out whats going wrong.

[ROM] B&N 1.4.1 upgrade through CWM [Dual Boot/Single Boot Compatible]

I had downloaded a version of this file from a post embedded deep inside one of the threads over here (sorry can't find it right now), but upon examination of its contents, I discovered some issues:
1. The checksums on the files in contained in the the original zip file showed that B&N had at least two versions of 1.3.0 update you can download from them, and the zip I got contained an older version so I put in the latest files in there.
2. There were unnecessary files included inside the original zip file, I deleted those, and only included what was needed.
3. There were errors in the script syntax, which I corrected, so that the proper commands are run during the update, and the proper sed substitutions are made during the editing of the unpacked init.rc inside the ramdisk.
What this zip will do is replace any older version of a B&N ROM on the alternate eMMC partitions of a dual booting configurations to the latest versions. This will prevent B&N from pushing the 1.3.0 update to you OTA, and messing up your dual boot setup. Just put the zip on your sdcard, boot into CWM recovery, and apply the zip. I apologize in advance for not giving credit to the original creators of the scripts here.
Note: There have been two different protocols for a dual booting u-boot.bin, with an older one relying on the files u-boot.altimg, and u-boot.altram to specify the names of the secondary boot ramdisk and kernel, and a newer one assuming that they are named uAltRam, and uAltImg respectively. This update conforms to the new u-boot.bin protocol. If you are still using the old one, you will have to get root access to /boot and edit the two files to point to uAltRam and uAltImg.
So if you want try it out, here it is:
http://www.mediafire.com/?gcrpzzc0kdoxcjx
MD5 Sum: 51e24c1e5eff11ba5ea481a63f7404eb
Update
I have now uploaded files for B&N Update 1.4.1.
The first file (MD5 Sum: 4ff1d9764663278c3f51e2e2c9d841a6) is meant to update a pre 1.4.1 Stock B&N ROM on secondary /system through CWM:
https://rapidshare.com/files/52135913/secondary_update_NC_stock_1_4_1.zip
The second file (MD5 Sum: c1506816fbfb8c419fbbc4afe1b12887) is meant to update a pre 1.4.1 Stock B&N ROM on primary /system through CWM without messing with recovery;
https://rapidshare.com/files/869435270/primary_update_NC_stock_1_4_1_keep_CWM.zip
The third file (MD5 Sum: ab1307c55a2c35c91d339c8037ce9a78) is meant to update a pre 1.4.1 Stock B&N ROM on primary /system through CWM, replacing recovery and all:
https://rapidshare.com/files/2059644016/primary_update_NC_stock_1_4_1.zip
None of these files will wipe user apps and data, so if you wish to do that, boot into recovery and wipe from there. [This will work on primary /data partition only]
Please note: If the B&N Stock ROM is rooted, you will lose root upon updating.
Thanks!
This worked beautifully! I flashed it from my sdcard after booting into CWM on my primary partition on emmc.
I'm betting you got the original from jasoraso in this dual boot thread: http://forum.xda-developers.com/showpost.php?p=17122342&postcount=142
What I would love is a straight CWM-flashable 1.3 ROM, to include in my up-to-date (for now) guide for setting up the dual boot, rather than having to set up and move 1.2, then update to 1.3.
That is possible to do by combining three of the steps. You need commands from the scripts from the prepare dual boot zip to resize /media and create the secondary system and data partitions, then the part of the script from the file that copies the contents of /data from primary to secondary and replaces u-boot.bin , and then my file which formats secondary /system and puts 1.3.0 there, and copies the latest kernel and patched ramdisk onto /boot. I can put such a file together, but I wouldn't be able to test it. The Nook belongs to my wife, and and you get the rest of the drift.
PS - You can use my file as is after running prepare dual boot and copy stock to secondary. It is not necessary to update secondary to 1.2 before going to 1.3.
Sent from my SAMSUNG-SGH-I897 using XDA App
rajendra82 said:
That is possible to do by combining three of the steps. You need commands from the scripts from the prepare dual boot zip to resize /media and create the secondary system and data partitions, then the part of the script from the file that copies the contents of /data from primary to secondary and replaces u-boot.bin , and then my file which formats secondary /system and puts 1.3.0 there, and copies the latest kernel and patched ramdisk onto /boot. I can put such a file together, but I wouldn't be able to test it. The Nook belongs to my wife, and and you get the rest of the drift.
Click to expand...
Click to collapse
Wait...what? What I'm talking about is a 1.3 zip made to work with CWM and in no way doctored to account for dual booting, just like the 1.2 zip one would otherwise use.
rajendra82 said:
PS - You can use my file as is after running prepare dual boot and copy stock to secondary. It is not necessary to update secondary to 1.2 before going to 1.3.
Click to expand...
Click to collapse
Have you tested this theory? I found that when I did not register my B&N install while it was on the primary partition, I was unable to boot into it on the secondary partition.
Taosaur said:
Wait...what? What I'm talking about is a 1.3 zip made to work with CWM and in no way doctored to account for dual booting, just like the 1.2 zip one would otherwise use.
Click to expand...
Click to collapse
Are you talking about updating an already rooted 1.0/1.1/1.2 Nook Color. I am sure the scripting to do that is exactly the same as what is in the 1.2 zip file. Just replace the 1.2 files inside the zip with the equivalent files from the 1.3 update. Make sure the portions which install su and busybox are included, and build.prop spoofig is applied. I am not sure it is worth it building such a zip file though. One is better off just applying the B&N update, and then rerooting with manual nooter. What I created was for people that have already doctored the setup for dual booting. In such a case, the B&N update would either fail, or would replace the primary partition instead.
Taosaur said:
Have you tested this theory? I found that when I did not register my B&N install while it was on the primary partition, I was unable to boot into it on the secondary partition.
Click to expand...
Click to collapse
No way to get around having to register the primary partition image first. Once that is done it could be moved to secondary and then updated straight to 1.3 instead of going 1.2 first.
I have a dual boot eMMC NC. I am not sure which setup I use but the last time I updated the CM7 nightly, I lost the dual boot until I installed the u-Boot again. I suspect I have the setup that looks for altFImg. So this is not going to work for me. I have 1.2 rooted which I use only occasionally. I am not even sure what is in 1.3 but I am curious.
yelloguy said:
I have a dual boot eMMC NC. I am not sure which setup I use but the last time I updated the CM7 nightly, I lost the dual boot until I installed the u-Boot again. I suspect I have the setup that looks for altFImg. So this is not going to work for me. I have 1.2 rooted which I use only occasionally. I am not even sure what is in 1.3 but I am curious.
Click to expand...
Click to collapse
All you need to do is boot into CM7, mount /boot as root, and then rename uFImg to uAltImg, uFRam to uAltRam, and then change the text inside u-boot.altimg and u-boot.altram to point to the new names instead of the old ones. This will keep you dual booting under the old u-boot.bin, and even after a new protocol u-boot.bin (like that installed by CM7) gets pushed to your Nook Color. Once you have done that, you can update the secondary to 1.3 using my zip file if you want.
rajendra82 said:
Are you talking about updating an already rooted 1.0/1.1/1.2 Nook Color. I am sure the scripting to do that is exactly the same as what is in the 1.2 zip file. Just replace the 1.2 files inside the zip with the equivalent files from the 1.3 update. Make sure the portions which install su and busybox are included, and build.prop spoofig is applied. I am not sure it is worth it building such a zip file though. One is better off just applying the B&N update, and then rerooting with manual nooter. What I created was for people that have already doctored the setup for dual booting. In such a case, the B&N update would either fail, or would replace the primary partition instead.
Click to expand...
Click to collapse
I wouldn't know what to change and what to leave alone, myself, but I think you're making this more complicated than it needs to be. I'm talking about installing 1.3 using CWM, regardless of how the device is partitioned or what was on the primary partition previously. Like the files in this thread, but 1.3: http://forum.xda-developers.com/showthread.php?t=1050520.
I understand that you were just cleaning up jaso's update-dualboot-to-1.3 file. I used the original and it worked fine, but it would have saved me a couple steps (and would be more useful in a guide for setting up dualboot) to simply install 1.3 rather than 1.2 to the primary partition when setting up. The reason I started with 1.2 is because it is the most current stock ROM available for CWM. What I would like is to avoid a historical re-enactment of stock OS development altogether. A general-purpose, CWM-flashable 1.3 ROM would be broadly useful, but is so far lacking as far as I've seen.
1. Do you envision this to be an uprooted stock 1.3 update ROM (either as primary or the only boot option) ? I just don't see the need for this to be CWM flashable. It is very easy to get there by resetting the device to stock, and then updating the device to 1.3.0 using the B&N file, and restoring dual boot as need be. If one has any older stock ROM running on primary, the B&N update will get them to 1.3 while losing root. There is no need to apply 1.2 update first.
2. Do you envision this to be for already rooted single or primary booting 1.1/1.2 users? There is once again no need to create any file for this. One can simply apply the B&N update, and then rerun manual nooter, and restore dual booting to the secondary.
3. The only users with no clear upgrade path are those who have already moved the B&N ROM to secondary. That's why I fixed up the zip file, and shared it. I am glad the original file worked for you despite the script errors. I can see other setups where it would have failed though.
I am not trying to make this more complicated than it needs to be. The Nook Color is just capable of being set up in so many ways, there isn't simply going to be a single update method that will work in all scenarios.
Sent from my SAMSUNG-SGH-I897 using XDA App
I'm envisioning it as a one step, starting-point-agnostic means of establishing a 1.3 stock install, whether for setting up a dualboot or for any other purpose. Its usefulness is made evident by the three-page thread devoted to CWM-flashable 1.2 images: http://forum.xda-developers.com/showthread.php?t=1050520
Taosaur said:
I'm envisioning it as a one step, starting-point-agnostic means of establishing a 1.3 stock install, whether for setting up a dualboot or for any other purpose. Its usefulness is made evident by the three-page thread devoted to CWM-flashable 1.2 images: http://forum.xda-developers.com/showthread.php?t=1050520
Click to expand...
Click to collapse
Then the best bet is two step process:
1. Wipe device and restore to factory stock.
2. Download B&N 1.3 update file from website and place it on the root of SD card. Let the device recognize it, and apply it.
Once the 1.3 update gets applied, you are free to reroot, install CWM, set up dual booting, or whatever the next step may be.
It is the only method that will work in all circumstance as it involves starting from scratch regardless of setup. If want to preserve any of your current setup, no one step file will work for all circumstances. Some people have the stock firmware rooted, others do not. Some have the stock as the only internal boot, others have it as primary option of a dual booting configuration, while others have it as a secondary option. Some have stock recovery and run CWM off the sdcard when needed and want to update their recovery to the latest stock version, others want to keep the CWM recovery, and not update the recovery. There simply is no way file to cope with all these options.
rajendra82 said:
All you need to do is boot into CM7, mount /boot as root, and then rename uFImg to uAltImg, uFRam to uAltRam, and then change the text inside u-boot.altimg and u-boot.altram to point to the new names instead of the old ones. This will keep you dual booting under the old u-boot.bin, and even after a new protocol u-boot.bin (like that installed by CM7) gets pushed to your Nook Color. Once you have done that, you can update the secondary to 1.3 using my zip file if you want.
Click to expand...
Click to collapse
You lost me at mount
Seriously, I am trying to see if what I have is compatible with your update before I apply the update. I have a couple of useful apps on my CM7 and I have lost the password. I don't want to be stuck without CM7 or start over again. I can live without the 1.3 update though. So I want to make sure I am up to the task of finding and renaming these files if I have to.
With that said, how do I mount the /boot partition? I go into terminal emulator and give the su command. Then I tried mount /boot but that didn't work.
Thanks for your help.
rajendra82 said:
1. Wipe device and restore to factory stock.
Click to expand...
Click to collapse
...the only means of doing so "that will work in all circumstance" and in any way resembles a single step is flashing a stock zip via CWM. Why not use an up-to-date zip? The usefulness of such files is demonstrated by the fact that:
such files exist for past stock versions
those files are in use
files like yours are used to work around the non-existence of up-to-date stock zips
If you're so comfortable working with update files, you very likely could have produced such a file in less time than you've spent rationalizing away the clearly demonstrated need for them. Tell you what, in all likelihood I can just swap a few files from B&N's 1.3 zip into the existing CWM-flashable 1.2 zips, correct? Which files do I replace?
Anyone?
---------- Post added at 02:15 PM ---------- Previous post was at 01:58 PM ----------
yelloguy said:
You lost me at mount
Seriously, I am trying to see if what I have is compatible with your update before I apply the update. I have a couple of useful apps on my CM7 and I have lost the password. I don't want to be stuck without CM7 or start over again. I can live without the 1.3 update though. So I want to make sure I am up to the task of finding and renaming these files if I have to.
With that said, how do I mount the /boot partition? I go into terminal emulator and give the su command. Then I tried mount /boot but that didn't work.
Thanks for your help.
Click to expand...
Click to collapse
I don't know for sure, but wouldn't rajendra's update create properly-named boot files alongside the old, improperly named ones? Wouldn't the multiboot built in to recent CM7 builds then look for and boot from the more recent, properly named files? I can't confirm that's how it would work, but it's what I would expect.
Taosaur said:
I don't know for sure, but wouldn't rajendra's update create properly-named boot files alongside the old, improperly named ones? Wouldn't the multiboot built in to recent CM7 builds then look for and boot from the more recent, properly named files? I can't confirm that's how it would work, but it's what I would expect.
Click to expand...
Click to collapse
Yes they would create properly named boot files. But I suspect my nook looks for improperly named files since I updated my u-boot after the CM7 nightly update.
The fix is simple: to rename the files. But I need to know how before I take the plunge.
yelloguy said:
Yes they would create properly named boot files. But I suspect my nook looks for improperly named files since I updated my u-boot after the CM7 nightly update.
Click to expand...
Click to collapse
Right, but if you run a CM7 update, it would replace your uboot again. I'm not saying do it, just wondering out loud if it would work.
yelloguy said:
Yes they would create properly named boot files. But I suspect my nook looks for improperly named files since I updated my u-boot after the CM7 nightly update.
The fix is simple: to rename the files. But I need to know how before I take the plunge.
Click to expand...
Click to collapse
In order to rename the files, you can do the following:
1. Boot into CM7 (or any other place where you have command line root access)
2. Create a temporary directory at a location where you have read write access.
3. Type su in a terminal session to gain root access and then mount mmcblk0p1 at the temporary location you created using the command:
mount /dev/block/mmcblk0p1 <full path to the directory you created>
4. Now use Astro to go over to the directory you created and mounted mmcblk0p1 into. You should see:
u-boot.bin which is the bootloader
u-boot.bin.stock which is the backup of the old stock bootloader
uImage and uRamdisk which are your primary kernel and ramdisk
uFImg and uFRam which are your secondary kernel and ramdisk (and whose names are mismatching the CM7 bootloader protocol)
u-boot.altimg and u-boot.altram, which are text files per the old bootloader method containing names of uFImg and uFRam
5. Rename uFImg to uAltImg, uFRam to uAltRam. And edit the contents of u-boot.altimg and u-boot.altram to match the new file names.
6. Reboot as usual into primary or secondary.
Now if an CM7 update ever replaces your u-boot.bin, you will not lose dual boot, as you have it set up as uAltImg and uAltRam per the new protocol.
Sent from my SAMSUNG-SGH-I897 using XDA App
---------- Post added at 03:24 PM ---------- Previous post was at 03:06 PM ----------
Taosaur said:
...the only means of doing so "that will work in all circumstance" and in any way resembles a single step is flashing a stock zip via CWM. Why not use an up-to-date zip? The usefulness of such files is demonstrated by the fact that:
such files exist for past stock versions
those files are in use
files like yours are used to work around the non-existence of up-to-date stock zips
If you're so comfortable working with update files, you very likely could have produced such a file in less time than you've spent rationalizing away the clearly demonstrated need for them. Tell you what, in all likelihood I can just swap a few files from B&N's 1.3 zip into the existing CWM-flashable 1.2 zips, correct? Which files do I replace?
Anyone?
Click to expand...
Click to collapse
I am sorry if you think I am rationalizing, but that was not my intention. I just wanted to point out that the files you linked to do not meet your own criteria.
Take for example the file update-nc-stock-1.2-keepcwm-signed.zip that you point to as missing in an up to date 1.3 version. That file will update a Nook Color to 1.2, but will keep CWM recovery. It however will make someone whose Nook Color 1.1 was rooted using autonooter lose root. A person that has been dualbooting to CM7 on secondary will lose that ability as well after applying that update. So unlike what you think, this is not a file to update stock 1.2 update under all circumstances regardless of what the starting point is. It has a specific use (update fro, a pre 1.2 stock primary eMMC boot, no dualboot, CWM recovery installed). Creation of an all situation stock restore file is impossible IMO, and the best you can do is wipe and apply 1.3 B&N stock update. You or I could technically create another equivalent file with update-nc-stock-1.3-keepcwm.zip /system files, kernel, ramdisk, etc., but this file would be subject to the same side effects as the original.
---------- Post added at 03:30 PM ---------- Previous post was at 03:24 PM ----------
Taosaur said:
Right, but if you run a CM7 update, it would replace your uboot again. I'm not saying do it, just wondering out loud if it would work.
Click to expand...
Click to collapse
It would work. If you apply my zip, there will be a uAltImg and uAltRam in /boot (in addition to uFImg and uFRam). If you apply another update that pushes the CM7 bootloader, it will then look for these files with trying to do an alternate boot, and would boot into a unrooted stock 1.3.
rajendra82 said:
In order to rename the files, you can do the following:
1. Boot into CM7 (or any other place where you have command line root access)
2. Create a temporary directory at a location where you have read write access.
3. Type su in a terminal session to gain root access and then mount mmcblk0 at the temporary location you created using the command:
mount /dev/block/mmcblk0 <full path to the directory you created>
Click to expand...
Click to collapse
I get an error:
mounting <paths> failed: Device or resource busy
Any ideas?
yelloguy said:
I get an error:
mounting <paths> failed: Device or resource busy
Any ideas?
Click to expand...
Click to collapse
I see a typo in my command (stupid Swiftkey X). It should be:
mount /dev/block/mmcblk0p1 <some directory>
Also try typing just mount in terminal to see if /dev/block/mmcblk0p1 is already mounted somewhere else.
rajendra82 said:
Take for example the file update-nc-stock-1.2-keepcwm-signed.zip that you point to as missing in an up to date 1.3 version. That file will update a Nook Color to 1.2, but will keep CWM recovery. It however will make someone whose Nook Color 1.1 was rooted using autonooter will lose root. A person that has been dualbooting to CM7 on secondary will lose that ability as well after applying that update. So unlike what you think, this is not a file to update stock 1.2 update under all circumstances regardless of what the starting point is. It has a specific use (update fro, a pre 1.2 stock primary eMMC boot, no dualboot, CWM recovery installed). Creation of an all situation stock restore file is impossible, and the best you can do is wipe and apply 1.3 B&N stock update. You or I could technically create another equivalent file with update-nc-stock-1.3-keepcwm.zip /system files, kernel, ramdisk, etc., but this file would be subject to the same side effects as the original.
Click to expand...
Click to collapse
Riiiiight... it would install stock 1.3 to the device. That's the intended behavior. The point is to avoid the unnecessary step of updating in any process that includes flashing stock to the sole or primary partition. One example of such a process would be a fresh dual boot setup. That it does not update or otherwise rely upon an existing install is the point.
Granted, such a file would not repartition the device, but it would install up-to-date stock in one step regardless of how a device is partitioned (1/5, 2/5, 5/1 or dual boot).

[WIP] CUSTOM ROMs / MODs / References

This thread will be a compilation of findings and references along the way as we make attempts to modify and hack our Nook Tablets. If you would like to add anything, please post it and I can compile into the OP posts. This is beyond rooting and bootloader bypass/bootstrap (for the most part), there are separate threads for those.
This will be for posting what certain files are found to do or involve, and which files to STAY AWAY FROM to prevent bootloops and forced recovery, and other findings that will help others to avoid issues or save time by learning from our discoveries. As we get CWM and the ability to replace entire ROMs, some of those risks will go away.
We are the Pioneers of the Nook Tablet, lets document our findings to keep track of them and to help others who will be making the NT an even better tablet.
Again, this is not to duplicate what is going on in the Dev Progress threads, but to help compile all of the scattered findings to compliment those threads.
System Recovery (Factory Restore):
There has been some question about the factory restore as to whether it just wipes data or does a complete /system restore as well.
There are two different modes of restore that can kick in, if you bork the system files or need to force a complete restore, you can do so.
Data only wipe:
The fastest and best way to get to this is to hold down the "n" button while powering on the tablet. This will wipe your side loaded or installed apps as well. If something gets messed up on your tablet and is forced into a recovery, this is the default recovery that will kick in after about 8 failed boot attempts.
Full system restore:
If your tablet continues to have failed boots after initiating the data wipe restore, it will force into a complete restore without even asking. First it will do the data wipe like normal, followed by a restore of factory software. Once done, your Nook Tablet will be restored to the way it was the first time you powered it on.
I have been able to force the full restore by powering off repeatedly during the data wipe. Once you see the restore kick in without giving the usual prompt to hit "n" or home to continue, just let it run and the complete restore will run.
Partition Files and Information:
"Factory" partition, this is where the factory restore pulls the files from (ROM, etc)
/dev/block/platform/mmci-omap-hs.1/mmcblk0p7 or /dev/block/platform/mmci-omap-hs.1/by-name/factory
DOWNLOAD ZIP FILE OF FACTORY PARTITION FILES HERE - There appears to be a Recovery image and boot image in this as well
I did try to alter the factory.zip rom file by not disturbing it's signature. I then mounted the factory partition and added the modded factory.zip
I forced a full restore but about 1/4 of the way into the factory software restore it aborted and told me to reboot. It did not install the modded rom files. So it checks beyond just the signature on the rom file, maybe md5 checks.
Working on other partitions and will add those as done....
Recovery Partition
/dev/block/platform/mmci-omap-hs.1/mmcblk0p3 or /dev/block/platform/mmci-omap-hs.1/by-name/recovery
Boot Partition
/dev/block/platform/mmci-omap-hs.1/mmcblk0p4 or /dev/block/platform/mmci-omap-hs.1/by-name/boot
Reserved.....
In trying to add new library files to /system/lib, I will get FC errors when testing changes and in reviewing the logcat, it is as if the files does not exist. The error will say the lib file is not found. Permissions are correct, and a full reboot has been done as well. I ran into a similar problem where an FC error was looking for a java class, and when the APK was decompiled, it was right there in the location it was suppoed to be.
I found a file, /system/manifest that has a list of the libs and framework files, along with a long code. Does anyone know what this is? It appears the ROM has a manifest of what is supposed to be in place, and if it falls outside of that it gets ignored. Editing this manaifest could be a critical piece at this point in doing some serious modifications.
There are also a couple of manifest files in the root (/) path as well.
Anyone familiar with this and can expand further?
Here is a few lines from the Manifest files.
/system/lib/libstagefright.so:99208dff1b94c6955e72abdfc8bc70fc020a113a
/system/lib/libsqlite_jni.so:df4a43e08d9a2c02aaed47ccbecba6be3d4b3e33
/system/lib/libsmapi.so:6c4761d3bbc3c18fa11d1d59ea7ae295d0874752
/system/lib/libsensorservice.so:654b3d705b4220441d819f337eef201d979a0003
/system/framework/com.bn.service.devicemanager.jar:144dfb6833f4ddf52bdd4f5cabf163aaf4724252
/system/framework/com.bn.app.deviceinfo.jar:9256951bbfe5126e54dade8d5ef3878ae0a05f20
/system/framework/services.jar:51c05355e9165b5683f0b40106e70fdfd7be41aa
/system/framework/pm.jar:0bc6fe41c40dc6205bac73443d0c771d9fa718e5
/system/framework/framework.jar:0f5b44a0c264061c5ba6efb9f04112fe752dea38
/system/lib/libstdc++.so:bd50887222d9a03ed683bcc94525b32b1405c0a7
I'd guess that's the MD5 sum of each file. Perhaps file integrity is confirmed by calculatung the current sum and comparing it to the stored value in this file. Any files you update in your image, consider calculating the new checksum and putting it here next to the right file?
Sent from my BNTV250 using Tapatalk
t-r-i-c-k said:
I'd guess that's the MD5 sum of each file. Perhaps file integrity is confirmed by calculatung the current sum and comparing it to the stored value in this file. Any files you update in your image, consider calculating the new checksum and putting it here next to the right file?
Sent from my BNTV250 using Tapatalk
Click to expand...
Click to collapse
That is what I was thinking, and hoping but wanted to confirm. Thanks !

stock sw overwriting /system/bin?

I'm noticing that changes I make to /system/bin get undone upon reboot on stock 5589 software.
My particular change is the wpa_supplicant ad hoc fix.
I used terminal to rename the old file to wpa_supplicant.back and put my new file in.
It works fine, I can connect to ad-hoc wifi fine, until I reboot. After reboot, the backup is gone, and the old file is back to it's original spot (breaking wifi).
I'm using temporary root under z4root if that makes a difference.
Anyone have any ideas, is there some type of "system restore" functionality in 5589 that refreshes system/bin upon startup?
Any workarounds if I want to remain on stock?
ml_boston said:
I used terminal to rename the old file to wpa_supplicant.back and put my new file in.
Click to expand...
Click to collapse
You shouldn't replace binaries while they're being used. Install CWM and use it to do the switch. Make sure you remount /system read-only afterwards.
The file wasn't in use, as I was able to run adhoc wifi (meaning the replace worked) until I rebooted.
I think I found the problem, from this link:
There is also another important file you should know about. In /system/recovery.img there is a full copy of everything that is loaded on mtd1. This file is automatically flashed onto mtd1 every time you shut down. That means two things: 1. Any changes you make directly to /dev/mtd/mtd1 get blown away on reboot and 2. If you want to change /dev/mtd/mtd1 you're probably better off just sticking the image in /system/recovery.img and rebooting. When creating your own custom update.zip files (especially when adapting the stock images), you can get tripped up if you forget to replace /system/recovery.img and it ends up overwriting /dev/mtd/mtd1 unbeknownst to you. Watch out.
Click to expand...
Click to collapse
So I've got to learn how to build an img file with my one swapped file. Or perhaps (will try soon and post back), deleting the recovery.img file will also do the job.
ml_boston said:
The file wasn't in use, as I was able to run adhoc wifi (meaning the replace worked) until I rebooted.
Click to expand...
Click to collapse
Unless the wifi was switched off or put into airplane mode or something like that as the default state, I assure you that the wpa_supplicant binary would've been in use. It's how modern Unixes work.
I think I found the problem, from this link:
Click to expand...
Click to collapse
Most of the specific details in that link a) either isn't relevant to your specific problem and/or b) does not apply to the gTab and the ROMs that run on it. For example, in the quote you pulled:
There is also another important file you should know about. In /system/recovery.img there is a full copy of everything that is loaded on mtd1. This file is automatically flashed onto mtd1 every time you shut down. That means two things: 1. Any changes you make directly to /dev/mtd/mtd1 get blown away on reboot and 2. If you want to change /dev/mtd/mtd1 you're probably better off just sticking the image in /system/recovery.img and rebooting. When creating your own custom update.zip files (especially when adapting the stock images), you can get tripped up if you forget to replace /system/recovery.img and it ends up overwriting /dev/mtd/mtd1 unbeknownst to you. Watch out.
Click to expand...
Click to collapse
Here,
1. There is no /system/recovery.img file on the stock ROM.
2. The quote talks about restoring "recovery"--not "system". Plus, those 2 partitions have radically different sizes (16 MB max for "recovery" and 200MB max for stock "system"). Think about what would happen to the boot times if a 200MB image had to be restored on every boot.
So, my advice is unchanged. Install CWM temporarily, then use it to switch the binary, and finally, sync and unmount /system before rebooting out of CWM. You can always restore the stock recovery using the recovery.img file in the 5699 update zip file from within CWM.

[help]Editing boot.img results in bootloop[help]

I need help editing the default.prop of my rooted boot.img for an LG LM-X210ULM K8+. I want to mark ro.debuggable off as 1 instead of 0 but which i have no problem doing but when i use any kitchen program it puts it back together as 15mb instead of 32mb and when i flash it to my device it always bootloops.
If any one could help i would appreciate it. Im including a copy of the rooted boot.img freshly pulled ftom my device
The size probably isn't the issue. Using AIK the size was even bigger than the original.
It's all just 0x00 the rest of that partition...
By using my old uImage/_recovery unpack-repack batch file
http://cxzstuff.blogspot.com/2013/03/uimagerecovery-unpack-repack-batch-file.html
the result was smaller but still a bit bigger than the Magisk had made.
But that is irrelevant really... result attached.
Yea i dont get it. The size doesnt matter as long as it diesnt exceed the max amount of space the partition can hold. But why does changing one value cause the boot.img to boot loop after flashing.
Even the boot.img you made looped after flashing
Duhjoker said:
Even the boot.img you made looped after flashing
Click to expand...
Click to collapse
Just tells that it's not the tool used. Or mine oldie is as bad/good as the newer one in this case.
What that Magisk img had was like it had some signature but it should not be needed and probably just garbage left there from the stock...
Should not matter, but how about doing it other way around? Modify the stock boot first and then give it to Magisk for rooting.
I think it was stock. Ill have to make sure though. wonder why magisk doesnt make the image debuggable to begin with. But your right it might be that im using a magisk patched image. Ive got some firmware already broke down ill give it another try here in a bit and post my results.
Duhjoker said:
I think it was stock. Ill have to make sure though. wonder why magisk doesnt make the image debuggable to begin with. But your right it might be that im using a magisk patched image. Ive got some firmware already broke down ill give it another try here in a bit and post my results.
Click to expand...
Click to collapse
So here we are. There should be some shortcut or something left to the original sub forum at least for a week or two when you boys move these threads - dammit...
Any luck? You have a customized recovery? How about these?
https://forum.xda-developers.com/an...g/mod-bootimage-adb-unsecure-patcher-t3618558
Yes luck tonight i did a fresh reflashing on my QC Lg k8+ and decided to break open the boot.bin from the kdz i used and made my changes to default.prop then i put the renamed to boot.img on my phone and let magisk patch it then flashed it via fastboot and dared it to go into system. Then i double dared it. Then for safe measure i double dog dared it to boot into system to which it had no choice but to go along with the or be labled a @!%\**__(€.
It booted.
So the lesson learned is to patch a fresh boot.img with your default.prop changes then have magisk patch it for root.
Now oddly when i patched and tweaked my recovery using carlive kitchen, i also made sure that the same changes to default.prop or rather i made sure they had been made and they had. But any terminal like emulator or termux pulls up the props using getprop with the changes unmade and i still cannot change the values of the system build.prop and when i patch it manually it reverts on reboot.
I literally have to open a vi in twrp to make changes. And forget about copying my own patched build.prop to system in twrp. Because that leads to boot loop as well
Ok so is there a reason that you dont make those changes in the boot.img any more? Because the past two days i have woke up to no root. I have had to reflash my boot.img both times
Ok i just compiled my first kernel from lg source code and now i dont know which of the split images in my folder is the zimage
Back to the drawing board quite literally. Im stuck for sure.
I need to make edits to a few files like init.rc and init.lge.power.rc to allow for changes in my newly compiled kernels. Basically im adding a couple properties and some cpu frequency stuff. Plus i want to make it back to adoptable storage and add a second sd partition for ext4 projects im working that would work best right off the root file system.
Im using the stock extracted boot.img from a kdz using salt and carliv kitchen to unpack and repack i have also mkbootimg tools that i compiled myself and some static arm version.
I extracted the ramdisk place my new kernel image in and repack with the init files changed and flash using recovery or fastboot and bootloop every time. And magisk isnt signing with the verity key.
ok i dont know whst was going on the other day but i can split boot.img again and make changes with out looping.
i used gparted on my linux machine to partition my 128gb sd card with 3/4 vfat and 1/4 ext4 i know that by using adb it will automount but thats one timr and i may need to switch out every now and then plus it put a center part in it of about 15mb. with gparted i get the two parts with no bs. any way i created a script that mounts the second part and even symlinks some stuff. it works good but im having trouble getting init.rc to run it.
on early-init
chmod 0755 /system/etc/init/init.mntsd.sh
exec system system /system/bin/sh /system/etc/init.mntsd.sh
any tips

Categories

Resources