[solved] Totally obliterated /system partition - Barnes & Noble Nook Tablet

While attempting to modify my wpa_supplicant in /system/app (not by any process listed here) I somehow managed to completely destroy my /system partition. Not a single file was left alive. My nook did not particularly like this, and now will not boot. I had installed cwm recovery through indirect's app, and cwm won't flash either of Barnes and noble's update zips for some reason. My question is, does anybody have a cwm compatible zip that will restore my /system, or can anyone point me to information on how to make one? Cwm's scripting language seems to be poorly documented, if documented at all. Thank you in advanced for any help! I worked on this for several days before posting.
Sent from my MB860 using xda premium

Have you tried with adb? If not then you haven't try it all.
Get in CWM and plug your device to the machine you used for root or working nook drivers, in CWM mount /system, take the \system folder of the acclaim_update.zip(unzip it) and put it in C:\ntroot ( where adb should be) , cut \system\bin folder and put it outside so it will look like this C:\ntroot\bin, open CMD as administrator and run
>cd C:\ntroot
> adb devices (Check if your device really gets recognized)
> adb push bin /system/bin ( it will push all the files inside bin folder to /system/bin and override them)
Repeat the process with the other folders.
Wish you luck!
PS: if you have CWM backup you could even unpack system.img is easy but you need linux ubuntu is fine so you use your own modified tweaked and working system.
~ Veronica
Sent from XDA premium using my Nook Tablet

Thank you, I didn't know adb could push entire folders! I would still like to learn how to make flashable zips, though. Should I just read the source code or something? I really cannot find any documentation.
Sent from my MB860 using xda premium

Zapcorns said:
Thank you, I didn't know adb could push entire folders! I would still like to learn how to make flashable zips, though. Should I just read the source code or something? I really cannot find any documentation.
Sent from my MB860 using xda premium
Click to expand...
Click to collapse
Pm celticwebsolutions user he just learned how to make flashable zips so he must have the documentation, I will look into it this week. Let me low if you managed to fix your nook.
~Veronica
Sent from XDA premium using my Nook Tablet

http://forum.xda-developers.com/showthread.php?t=1187313
http://www.freeyourandroid.com/guide/introdution_to_edify
http://blog.coralic.nl/2010/01/25/how-to-create-update-zip-using-your-build-aka-system-img/
A cwm flashable zip must have a META-INF directory and whatever you're loading with a structure like below:
/META-INF
-/com
--/google
---/android
----/update-binary (file)
----/updater-script (file)
/system (or whatever you're loading)
'updater-script' uses the edify script language to mount, copy, set permissions, etc. Make sure this is in unix formatted text and not dos/win. Some CWM versions dislike dos/win formatted text. May as well make sure it's unix to avoid any issues.
You can just pull 'update-binary' from any flashable zip for the NT.
Once the zip is created you need to sign it, but CWM can be set to ignore that.
Just look at other cwm installable zips for examples.
http://downloads.androidsu.com/superuser/
http://forum.xda-developers.com/showthread.php?t=1458452

Igthorn said:
http://forum.xda-developers.com/showthread.php?t=1187313
http://www.freeyourandroid.com/guide/introdution_to_edify
http://blog.coralic.nl/2010/01/25/how-to-create-update-zip-using-your-build-aka-system-img/
A cwm flashable zip must have a META-INF directory and whatever you're loading with a structure like below:
/META-INF
-/com
--/google
---/android
----/update-binary (file)
----/updater-script (file)
/system (or whatever you're loading)
'updater-script' uses the edify script language to mount, copy, set permissions, etc. Make sure this is in unix formatted text and not dos/win. Some CWM versions dislike dos/win formatted text. May as well make sure it's unix to avoid any issues.
You can just pull 'update-binary' from any flashable zip for the NT.
Once the zip is created you need to sign it, but CWM can be set to ignore that.
Just look at other cwm installable zips for examples.
http://downloads.androidsu.com/superuser/
http://forum.xda-developers.com/showthread.php?t=1458452
Click to expand...
Click to collapse
lol now i realized i've always played with the tools for make this but i have never used them to create update.zip's or flashable zips just to extract .img files and sign them lmao, i have made a tutorial about this in other forum toowhich will be posting here too, for now i leave the tools i used like unyaffs, etc which are needed and will make your life easier.
IMG_tools.zip
And this is the tutorial, just some more reference
~ Veronica

Good news, I just managed to make it fail to boot at a different point. That's not much, but its progress. Does anyone have any ideas? I did successfully restore /system (I think) so I don't know why I'd won't boot.
Sent from my MB860 using xda premium

Zapcorns said:
Good news, I just managed to make it fail to boot at a different point. That's not much, but its progress. Does anyone have any ideas? I did successfully restore /system (I think) so I don't know why I'd won't boot.
Sent from my MB860 using xda premium
Click to expand...
Click to collapse
unmount system, wipe cache, advanced> wipe dalvik cache, fix permissions in CWM try that and give more details of its status.
~ Veronica

Zapcorns said:
While attempting to modify my wpa_supplicant in /system/app (not by any process listed here) I somehow managed to completely destroy my /system partition. Not a single file was left alive. My nook did not particularly like this, and now will not boot. I had installed cwm recovery through indirect's app, and cwm won't flash either of Barnes and noble's update zips for some reason. My question is, does anybody have a cwm compatible zip that will restore my /system, or can anyone point me to information on how to make one? Cwm's scripting language seems to be poorly documented, if documented at all. Thank you in advanced for any help! I worked on this for several days before posting.
Sent from my MB860 using xda premium
Click to expand...
Click to collapse
find any CW flashable zip, get the 1.4 acclaim zip, copy all content from acclaim zip, EXCEPT META folder, to the CW zip, and put the CW zip, overwrite if it asked, you just produced on SD and flash it win recovery. You will need to re-root.

So, I managed to do the same thing...not to ask for help or anything but can someone provide a link to a CW zip that can get me back to square one?

I was finally able to fix it! Using Cobrato's flashable zip in the developer forum, i was able to flash a working system. It even included many of the apps i had been using before not available on the market. Thank you for all youre help.
Sent from my BNTV250 using xda premium

Zapcorns said:
I was finally able to fix it! Using Cobrato's flashable zip in the developer forum, i was able to flash a working system. It even included many of the apps i had been using before not available on the market. Thank you for all youre help.
Sent from my BNTV250 using xda premium
Click to expand...
Click to collapse
Great News!
Please update your OP title.

And link to the file that fixed it. I'm sure one of us other n00bs will do the same.
Sent from my PG06100 using xda premium

Heric1 was in the same situation but i gave him a link that i found in development with 1.4.0 stock ROM with indirect and cfoesch root methods and it worked ill post this links in My FAQ. Development should have the thread that was created to index all the ROMS updated and stickied
http://forum.xda-developers.com/showpost.php?p=21748940&postcount=57
~ Veronica
Sent from XDA premium using my Nook Tablet

Related

Clockworkmod for Cellular South Galaxy S Showcase

The Showcase is the Cellular South version of Fascinate and is very similar in structure to the Mesmerize. While it has been determined that the Mesmerize files work for the Showcase kernel and Clockworkmod, I was able to get jt1134 to compile the same files from a dump of my showcase. Attached is the kernel for clockworkmod as well as instructions for getting it installed. redbend_ua and zimage are located in the kernel_update folder of zip file.
You will also need to be rooted and have the sdk installed to use adb.
You will need to install redbend_ua first extract the zip file then;
Code:
adb push path/to/redbend_ua /sdcard/redbend_ua
then you need to make it executable
Code:
adb shell
su
chmod 777 /sdcard/redbend_ua
Now you need to move it to the /system/xbin
Code:
adb shell
su
mv /sdcard/redbend_ua /system/xbin/redbend_ua
Take the zImage file and push it to the sd card.
Code:
adb push path/to/zImage /sdcard/zImage
Finally we need to flash the zImage
Code:
redbend_ua restore /sdcard/zImage /dev/block/bml8
Now you can download clockworkmod from market and install the fascinate version of recovery. When you get done you can then flash the attached zip and it will replace your stock phone kernel with the modded one giving access to bln and some other stuff.
Big thanks to jt1134 for taking the time to answer my questions and compile the kernel zip for my phone. Also props to thescorpion420 who I borrowed the installations steps from, since he already had it so well layed out in the mesmerize post. http://forum.xda-developers.com/showthread.php?t=850898
Thanks for the writeup! And thanks for the help, got this going on my Showcase a couple of days ago... very nice to have the ability to make backups!
Hey, sorry, I'm having some odd trouble with this and I was wondering if someone could help. When I attempt to push the file, I'm getting a "permission denied" error. Any idea how to fix this?
I had similar troubles when I did it... I used Root Explorer to move the files into the proper locations, and Terminal Emulator to run the commands.
Hey. Is the zImage the zip file attached to the first post? Sorry, I'm learning. Managed to get to the last couple of steps!
ShadowDude said:
Hey. Is the zImage the zip file attached to the first post? Sorry, I'm learning. Managed to get to the last couple of steps!
Click to expand...
Click to collapse
the zImage file is in the kernel_update folder of the zip file... so open the zip file and extract it from there.
anyone else from cell south lose vibrate?
Sent from my SCH-I500 using Tapatalk
Pensacola06 said:
anyone else from cell south lose vibrate?
Sent from my SCH-I500 using Tapatalk
Click to expand...
Click to collapse
You lost vibrate after making some modification?
after flashing the above kernel
Sent from my SCH-I500 using Tapatalk
Pensacola06 said:
after flashing the above kernel
Sent from my SCH-I500 using Tapatalk
Click to expand...
Click to collapse
No problem with vibrate for me after flashing the kernel... did you make a backup?
Vibrate is working fine on mine.
Sent from my SCH-I500 using XDA App
restored from backup, vibrate still broke, even tried factory reset. do you think warranty will cover?
Sent from my SCH-I500 using Tapatalk
I am an idiot. I was reading "bml8" as "bm18." *facepalm* Thanks for the help!
Pensacola06 said:
restored from backup, vibrate still broke, even tried factory reset. do you think warranty will cover?
Sent from my SCH-I500 using Tapatalk
Click to expand...
Click to collapse
I'm sure it will... that sounds like a hardware issue at this point
Has anyone tried flashing super clean rom for the mesmerize?I figure since the showcase and the mezmerize have a lot of similarities it might be possible but i dont want to brick it.
Flip260z said:
Now you need to move it to the /system/xbin
Code:
adb shell
su
mv /sdcard/redbend_ua /system/xbin/redbend_ua
Click to expand...
Click to collapse
I'm still getting the error:
failed on '/sdcard/redbend_ua' -Cross-device link
downloading Astro Free* right now to see if I can move it with that... Doesn't look like the FREE version will let me move or copy the file. I'm wondering if it will work if I buy Root Explorer
Well Root Explorer solved my issue. For some reason xbin had RO rights.. I flashed the Recovery now I'm installing ROM Manager to do a back up..
Finally finished my first back up..
Worked with no issues. Thank you for getting us one step further in Showcase development
Sent from my SCH-I500 using XDA App
add144 said:
Worked with no issues. Thank you for getting us one step further in Showcase development
Sent from my SCH-I500 using XDA App
Click to expand...
Click to collapse
there's now a vudoo kernel jt posted for the fascinate, mersmerize, showcase and it's smoking fast..
Can someone tell me how to do this from the terminal on my phone? my phone isnt showing under devices.
paullytinkle said:
Can someone tell me how to do this from the terminal on my phone? my phone isnt showing under devices.
Click to expand...
Click to collapse
Essentially, you would download Terminal Emulator from the Android Market and run the commands in the terminal. Note that the files should be copied to your /sdcard/ first!
A little more info, since you're running it from the phone (and not adb shell) your first command will be: su. PM me if you need more help!

[Q] Un-rooting question

Bit of a noob question here, as my ADB proficiency is a bit lacking... In the sticky titled "Return to stock properly and safely" the instructions refer to pushing a file called "misc.img," however, when I attempt this, it obviously finds no file with that title. I've downloaded the two files from the post and tried them both on the root of my drive and in the tools folder of the SDK, but with no luck. I'd like to unroot for the time being to compare rooted performance to stock performance (i'm sure I'll end up rooting again before long... I bore easily!) Any input from the pros would be welcome! Thanks!
I'm pretty sure you can just slap on the pg05 img onto your sd card, reboot into stock recovery and let it load..
Sent from my ADR6400L using XDA Premium App
royolpunk said:
I'm pretty sure you can just slap on the pg05 img onto your sd card, reboot into stock recovery and let it load..
Sent from my ADR6400L using XDA Premium App
Click to expand...
Click to collapse
Yes you can, did it, done it, it worked.
gatorhater73 said:
Bit of a noob question here, as my ADB proficiency is a bit lacking... In the sticky titled "Return to stock properly and safely" the instructions refer to pushing a file called "misc.img," however, when I attempt this, it obviously finds no file with that title. I've downloaded the two files from the post and tried them both on the root of my drive and in the tools folder of the SDK, but with no luck. I'd like to unroot for the time being to compare rooted performance to stock performance (i'm sure I'll end up rooting again before long... I bore easily!) Any input from the pros would be welcome! Thanks!
Click to expand...
Click to collapse
sounds like you dont have your path set correctly if you placed it in the tools folder and it didn't push You could manually cd your sdcard or whichever location the misc.img file is placed in to push it if your path IS set correctly and I'm overlooking something...
you have to extract the misc file to your tools file
Sent from my ADR6400L using XDA App

[MOD/HACK] init.d re-hack

This is something I realized when the init.d hack by naven was posted, it plain didn't work for me, and after some investigation i discovered that not all busybox versions had the run-parts applet.
It has come to my attention to that many users may not have the proper hack installed, at least the ones using my scripts, I had them check in /data for the zipaplign log and it was in fact not there.
I got it working by modding navens hack. Credit goes to him for his discovery.
Here is a link to the flashable zip. If you are using my scripts, check in /data for the zipalign log, if you don't have one, just flash this zip, reboot, and check again.
http://www.sendspace.com/file/9g6ngz
Thanks!
Edit (8/31/2011): Just so there is no confusion, this is not my new Speedy script, this is just a re-hack for init.d originally discovered by naven. This will just help those of you having problems with his hack. Obviously you need to be rooted and have recovery bootstrap.
Just flashed your zip. Log file in /data
Welcome back! Thanks for your work on the X2.
Sent from my DROID X2 using xda premium
Grapejelly!!
Sent from my DROID X2 using xda premium
Worked perfectly
Sent from my DROID X2 using XDA App
Is this a new version of your script then?
Do we have to flash this the same way with recovery (aka renaming it to update.zip) like i had to go with the manual gb update?
Nevermind, figured that out.. but why am i getting a signature verification on install? Where do i turn off sig verification?
SuBDivisions said:
Nevermind, figured that out.. but why am i getting a signature verification on install? Where do i turn off sig verification?
Click to expand...
Click to collapse
There is an option under advanced I think, in recovery, to enable/disable that.....
I dont have that option, unless now there is some other recovery peice im missing.. my recovery whichis Android System Recovery (3e) only has reboot, apply update, wipe data, wipe cache.
SuBDivisions said:
I dont have that option, unless now there is some other recovery peice im missing.. my recovery whichis Android System Recovery (3e) only has reboot, apply update, wipe data, wipe cache.
Click to expand...
Click to collapse
You need to use the modified boot -strap recovery available on this forum. D/L it & install it like any other app. When you open it, just read & follow the directions on the screen & you will get to the custom recovery where all good things flash from.
Sent from my DROID X2 using xda premium
SuBDivisions said:
I dont have that option, unless now there is some other recovery peice im missing.. my recovery whichis Android System Recovery (3e) only has reboot, apply update, wipe data, wipe cache.
Click to expand...
Click to collapse
You should be flashing this thru the Bootstrap Recovery, not the default Android Recovery.
Sent from my DROID X2 using Tapatalk
Ahh HA.. See i know i was missing something.. Thanks have been given.
Zip-align logs were not showing in /data/ for me, so I flashed this, and now they do.
I'm assuming that means the rest of the scripts weren't working either?
Cool. Going to flash this but need a quick question answered.
I have Busybox 1.19.0 installed. I downloaded "Busybox" from marketplace to install 1.18.4 but which location should I chose?
Options are /system/xbin/ or /system/bin/
Thanks
Sorry found this in original init.d hack thread:
BusyBox with run-parts binary, installed in /system/xbin - If you don't have BusyBox, you can download it from the market here.
Click to expand...
Click to collapse
hapyman said:
Cool. Going to flash this but need a quick question answered.
I have Busybox 1.19.0 installed. I downloaded "Busybox" from marketplace to install 1.18.4 but which location should I chose?
Options are /system/xbin/ or /system/bin/
Thanks
Sorry found this in original init.d hack thread:
Click to expand...
Click to collapse
You should be okay on 1.19.0 now, but busybox should always always be installed in xbin.
So which init is better or the working one?
gkitab said:
So which init is better or the working one?
Click to expand...
Click to collapse
Some people find that the re-hack (this thread) works (and the original does not), others find that the original hack works just fine. A way to test is to install my Speedy Gonzales scripts, reboot the phone, and then check in /data for a zipalign log. If not, then flash this re-hack.
I am running speedy. So should I us you init when using yours and his when trying his? How can we tell if yours is working and when using his if his is working? This is getting a bit confusing. I also noticed when I flashed speedy navens old oo got left behind. So I deleted al scripts in init folder and reflashed yours and all yours are now correct.
With his init and your script. Yours scripts are in there but no zipalign in data.
Should I start over by deleting unit folder flash your unit then speedy would that be the safe bet?
Thanks for staying.
gkitab said:
I am running speedy. So should I us you init when using yours and his when trying his? How can we tell if yours is working and when using his if his is working? This is getting a bit confusing.
Thanks for staying.
Click to expand...
Click to collapse
They are two separate things entirely. I posted the re-hack for those having troubles getting scripts to run with naven's original hack. The re-hack posted in this thread doesn't contain any init.d scripts, it's purely the hack. Like I said above, a good way to test his hack is to install my scripts (which it looks like you have), and then use a file manager like Root Explorer and navigate to /data, there should be a zipalign log, if there isn't then his hack isn't working.
Edit: Well, the biggest question is if the init hack you have installed is even working. I'm assuming you have naven's... try the above, let me know if the log is there or not.
I edited my post can you please check it and let me know what you think.
I do have his with your script.
I think I should I should delete init completely and start fresh with yours and your scripts. That sounds like safest bet. Or does naven init need to be there first then yours on top then your scripts. Thanks.

[recovery][ALPHA]CWR-5.0.2.7-cvpcs+DK_RECOV.zip

Notice this could hose,break,trash or brick your phone. You are warned.
Update
Thanks to both CVPCS and Dragonzkiller and the DX2-Dev-Team. And of course thanks to koush. And Tenfar too did he did find the /preinstall hack? Did Dragonzkiller fixed the graphics or what? IDNK, it is fixed(/sbin/recovery in DK, cvpcs is broken). Hence the hybrid zip.
The UL zip works some what from /preinstall see my thread. http://forum.xda-developers.com/showpost.php?p=20634404&postcount=1 It may do the same if flashed via Tenfars,our bootstrap, just flash it as you would any zip and it will take over.
It backs up and will restore, from adv restore, /cache and(if set in recovery.fstab) sd-ext. A full restore bombs:
Checking MD5 sums...
cache.ext3.tar: OK
data.ext3.tar: OK
system.ext3.tar: OK
couldn't find default
Found new backup image: /sdcard/clockworkmod/backup/2012-01-02.05.08.01//system.ext3.tar
Restoring system...
E:format_volume failed to unmount "/system"
Error while formatting /system!
Other features may work. I find that zipping from win7 winrar fails but Root Explorer zipping results work.
/sbin/recovery is distorted (main screen):
https://github.com/cvpcs/DroidX2Bootstrap/tree/master/assets
Distortion fixed;
https://github.com/DX2-Dev-Team/DX2-CWMR/tree/master/assets
Edit What is the "/preinstall cwr hack"?
TO PUT IN PLAIN TERMS : ALL YOU NEED FOR ANY CHARGE ENABLED RECOVERY:
THE FILES: "hijack" AND (THE HACKED) "charge_only_mode" IN /system/bin
AND ".revovery_mode" IS IN /data
YOU DO NOT NEED ANYTHING ELSE BUT TO LOAD /preinstall
WITH YOUR FAV RECOVERY NAMED: "update-recovery.zip", ALONG WITH IT'S BINARY (SAME AS INSIDE THE ZIP/meta-inf....) CALLED: "update-binary" AND "hijack" (SAME AS ABOVE). Thats it! 6 files. With permissions- See above link.
Older post
5.0.2.0 http://download.clockworkmod.com/recoveries/recovery-clockwork-5.0.2.0-olympus.zip
Not everything works: when flashing between recoveries they need to be on internal sd, and, of course, backup and restore may work but its for ul bootloaders only.
DO NOT FLASH FROM ROM MANAGER. IT WILL BE SBF time.
Flash from tenfars and keep a copy of both on int sd (tenfars update-recovery.zip and the DL) to go back and forth. Do not backup and restore with this.
Just checked out the updater script and it looks like it should work, barring no needed changes on the scripts in sbin that it copies. I wonder if ADB works in it on this one. This could be a huge bonus for what were trying to do since BSR is kinda old and crappy
No adb in adv menu.
skwoodwiva said:
No adb in adv menu.
Click to expand...
Click to collapse
ADB shouldnt be in a menu. Should just be enabled by default. Course it only would work if it was plugged into a computer at the time you dropped into CWR. It doesnt support USB state changing.
So if the cwr in charge mode triggered, as is the preinstall hack, then no adb?
Log from cwr
init.svc.battd running
.usbd running
.touch stopped
.atvc stopped
.adb running
Extended commands not found.
See if you can run any adb commands like:
adb devices
adb pull /system/build.prop
etc...
It fails to mount sdcard. When recovering or manual mount.
I'm done messing this one.
I was able to overwrite the one in /data/data/tenfar folder but not in /preinstall folder anything special I need to try? Still went into BSR when I rebooted to recovery.
Sent from my DROID X2 using XDA App
I am learing as I go, but the point I realized is when you go to adv menu,in cwr,and reboot recov the current cwr gets loaded to /preinstall. So paste to data/data...files run sr then do reboot recov. Then paste to preinstall.
Cool ill give that a shot thanks!!!
Sent from my DROID X2 using XDA App
If I had the knowhow I would hack the garphics from 5010atrix to 5025x2!! .
But why would the newest Dx2 be any good and NOT a failure and be so messed for all this time? Unless one failure hides the other.
It probably can't mount SD due to a wrong mountpoint in one of the scripts. Should be easy to fix.
http://download.clockworkmod.com/recoveries/recovery-clockwork-5.0.2.0-olympus.zip
newer atrix 5020 all works but restore fails as boot img, of course, won't load.
skwoodwiva said:
http://download.clockworkmod.com/recoveries/recovery-clockwork-5.0.2.0-olympus.zip
newer atrix 5020 all works but restore fails as boot img, of course, won't load.
Click to expand...
Click to collapse
how hards that going to be to fix?
Ha ha ha ha!
You got me!
But it easy to flash between these cwrs even back to tenfars. Want to find a way to recwr after a wipe or flash.
The skewed graphics problem is from within the recovery (binary) in /sbin of the
zip: http://download.clockworkmod.com/recoveries/recovery-clockwork-5.0.2.5-daytona.zip .
I pasted the file from the above into this http://download.clockworkmod.com/recoveries/recovery-clockwork-5.0.2.0-olympus.zip and got same graphics skewing.
balltongue said:
See if you can run any adb commands like:
adb devices
adb pull /system/build.prop
etc...
Click to expand...
Click to collapse
Is this from android/sdk in win7?
Can you give me a prep? I am just a NooB.
Within your sdk folder look for platform tools, adb is within this folder. Navigate to platform tools directory using cmd then enter the commands.
Sent from my DROID X2 using xda premium
skwoodwiva said:
Is this from android/sdk in win7?
Can you give me a prep? I am just a NooB.
Click to expand...
Click to collapse
I pm'd you with some info about setting up sdk.

Flash image gui?

Would this be a possible solution to our kernel flashing problems, I know it works for the evo
Sent from my HTC Amaze 4G using XDA App
DEFINITIONOFREAL said:
Would this be a possible solution to our kernel flashing problems, I know it works for the evo
Sent from my HTC Amaze 4G using XDA App
Click to expand...
Click to collapse
It's possible. In fact I mentioned this about a month ago to a developer.
I would like to see one that has a couple of options such as flashing recovery and flashing boot.img files.
You can easy push the flash_image binary to /system/bin and set the permission to 755. In fact my CWMFaux kernel does just that. Faux stopped using it because it doesn't always work.
In fact I made it so easy that all you need to do is push the boot.img to /system and reboot. Yet... no one uses it. In fact I suggested to a couple of rom developers to simply add the binary file to /system/bin so that you can at least run the command from terminal but they don't even want to do that. I like being able to update my recovery at anytime by entering "flash_image recovery /sdcard/recovery.img" and then just rebooting to recovery. You can easily do that for kernels too. But I suppose it's so much easier to carry a computer around.
Binary100100 said:
It's possible. In fact I mentioned this about a month ago to a developer.
I would like to see one that has a couple of options such as flashing recovery and flashing boot.img files.
You can easy push the flash_image binary to /system/bin and set the permission to 755. In fact my CWMFaux kernel does just that. Faux stopped using it because it doesn't always work.
In fact I made it so easy that all you need to do is push the boot.img to /system and reboot. Yet... no one uses it. In fact I suggested to a couple of rom developers to simply add the binary file to /system/bin so that you can at least run the command from terminal but they don't even want to do that. I like being able to update my recovery at anytime by entering "flash_image recovery /sdcard/recovery.img" and then just rebooting to recovery. You can easily do that for kernels too. But I suppose it's so much easier to carry a computer around.
Click to expand...
Click to collapse
Im going to contact joeykrim and see if I can get him to add support in his app, and Ive been using your method since I got the phone (2 days ago) and started reading, but still a little hassle, and a big htc fail
Sent from my HTC Amaze 4G using XDA App
DEFINITIONOFREAL said:
Im going to contact joeykrim and see if I can get him to add support in his app, and Ive been using your method since I got the phone (2 days ago) and started reading, but still a little hassle, and a big htc fail
Sent from my HTC Amaze 4G using XDA App
Click to expand...
Click to collapse
Keep me posted will ya?
I believe that Faux and other developers would have to use the zImage kernel flashing technique to get it to work with his existing app but I'm sure he can simplify it to accept .img files and the .ko files in the /system/lib directory of a zip file. It actually should be very easy. It took me about ten mintues with testing included to create the script for my method. I just can't code for apps else it would be done by now.
DEFINITIONOFREAL said:
Im going to contact joeykrim and see if I can get him to add support in his app, and Ive been using your method since I got the phone (2 days ago) and started reading, but still a little hassle, and a big htc fail
Sent from my HTC Amaze 4G using XDA App
Click to expand...
Click to collapse
I contacted pershoot, no answer lol!!!
Joeykrim is willing to support the Amaze, he just needs testers, this would be a great backup incase the new script failed to push the kernel. I'll keep everyone posted with updates
Sent from my HTC Amaze 4G using XDA App
I've been working with joeykrim getting his app setup for our device, it looks like it should work, hopefully, within the next couple of days we can get this working and released
Sent from my HTC Amaze 4G using XDA App
DEFINITIONOFREAL said:
I've been working with joeykrim getting his app setup for our device, it looks like it should work, hopefully, within the next couple of days we can get this working and released
Sent from my HTC Amaze 4G using XDA App
Click to expand...
Click to collapse
That would be wonderful!
I'm tired of having to repeat myself.
flash_image boot /sdcard/boot.img
flash_image recovery /sdcard/recovery.img
Binary100100 said:
That would be wonderful!
I'm tired of having to repeat myself.
flash_image boot /sdcard/boot.img
flash_image recovery /sdcard/recovery.img
Click to expand...
Click to collapse
I just wish the devs would use your script, it would make things so much easier
Sent from my HTC Amaze 4G using XDA App
DEFINITIONOFREAL said:
I just wish the devs would use your script, it would make things so much easier
Sent from my HTC Amaze 4G using XDA App
Click to expand...
Click to collapse
Once I see that they do I can work out something else like:
kernelupdate
recoveryupdate
kernelupdate would be
flash_image boot /sdcard/kernel/*boot*.img
recoveryupdate would be
flash_image recovery /sdcard/recovery/*recovery*.img
So that if you place ANY of the appropriate img file in the perspective folders on the sdcard partition it would flash the .img by just entering either of the two commands from adb shell or terminal.
But I'm not going to waste my time if the devs don't want to use it.
Binary100100 said:
Once I see that they do I can work out something else like:
kernelupdate
recoveryupdate
kernelupdate would be
flash_image boot /sdcard/kernel/*boot*.img
recoveryupdate would be
flash_image recovery /sdcard/recovery/*recovery*.img
So that if you place ANY of the appropriate img file in the perspective folders on the sdcard partition it would flash the .img by just entering either of the two commands from adb shell or terminal.
But I'm not going to waste my time if the devs don't want to use it.
Click to expand...
Click to collapse
could a script be written to automatically flash these while installing/flashing the custom rom? This would cut down atleast the step for flashing kernels for a lot of noobs!!
seansk said:
could a script be written to automatically flash these while installing/flashing the custom rom? This would cut down atleast the step for flashing kernels for a lot of noobs!!
Click to expand...
Click to collapse
Actually, yes! I did add it to the init.d script but since xboarder had removed the init.d scripts from his rom it doesn't work anymore. But you sure could. It was basically how I was setting up my CWMFaux kernels. However it didn't seem to work 100% of the time. Couldn't figure out why.
It basically worked like this...
Flashing the CWM custom kernel .zip via recovery.
copies boot.img to /system
copies init.d 06tweaks script to init.d folder.
copies and set permissions for flash_image binary and kernelupdate script to /system/bin directory.
You then boot your phone up which triggers the init.d script which commands the kernelupdate script to initiate. The kernel update script is simply using the flash_image binary command "flash_image boot /system/boot.img" and it automatically updates the kernel. Then the init.d script removes the boot.img file from the /system directory to keep it from flashing upon every boot.
I would like to change it to /sdcard directory but there's the problem that the sdcard doesn't get mounted until the very end. WAY after the system. Which is why I stored it there. The system gets mounted even before the data partition so I couldn't even store the file in data because the script would run even before the data partition could mount. Basically the script is initiated while your still looking at the boot animation. Pretty much when your softkey backlights and led light comes on it flashes the new kernel. It's a pretty neat workaround if I must say but unfortunately nowhere near perfect and not even close to having an s-off workaround.
Now if you don't mind the fact that it won't be initiated upon boot I could make it so that it will flash any file in a perspective folder on the sdcard.
example:
kernelupdate would update the kernel with any *boot*.img file located in a certain directory... say /sdcard/kernel
recoveryupdate would update the recovery with any *recovery*.img file located in a certain directory... say /sdcard/recovery
The problem:
Some people would want to collect their kernels and recoveries and store them in those directories. That would NOT be possible since using the command "flash_image recovery /sdcard/*recovery*.img would flash any img file with the word "recovery" in it. So if there's more than one it would error out and not flash anything because of the conflict. Same principal with the kernel only MOST kernels are simply named "boot.img" where-as almost all recovery files have a unique name since they are all already custom.
Binary100100 said:
Actually, yes! I did add it to the init.d script but since xboarder had removed the init.d scripts from his rom it doesn't work anymore. But you sure could. It was basically how I was setting up my CWMFaux kernels. However it didn't seem to work 100% of the time. Couldn't figure out why.
It basically worked like this...
Flashing the CWM custom kernel .zip via recovery.
copies boot.img to /system
copies init.d 06tweaks script to init.d folder.
copies and set permissions for flash_image binary and kernelupdate script to /system/bin directory.
You then boot your phone up which triggers the init.d script which commands the kernelupdate script to initiate. The kernel update script is simply using the flash_image binary command "flash_image boot /system/boot.img" and it automatically updates the kernel. Then the init.d script removes the boot.img file from the /system directory to keep it from flashing upon every boot.
I would like to change it to /sdcard directory but there's the problem that the sdcard doesn't get mounted until the very end. WAY after the system. Which is why I stored it there. The system gets mounted even before the data partition so I couldn't even store the file in data because the script would run even before the data partition could mount. Basically the script is initiated while your still looking at the boot animation. Pretty much when your softkey backlights and led light comes on it flashes the new kernel. It's a pretty neat workaround if I must say but unfortunately nowhere near perfect and not even close to having an s-off workaround.
Now if you don't mind the fact that it won't be initiated upon boot I could make it so that it will flash any file in a perspective folder on the sdcard.
example:
kernelupdate would update the kernel with any *boot*.img file located in a certain directory... say /sdcard/kernel
recoveryupdate would update the recovery with any *recovery*.img file located in a certain directory... say /sdcard/recovery
The problem:
Some people would want to collect their kernels and recoveries and store them in those directories. That would NOT be possible since using the command "flash_image recovery /sdcard/*recovery*.img would flash any img file with the word "recovery" in it. So if there's more than one it would error out and not flash anything because of the conflict. Same principal with the kernel only MOST kernels are simply named "boot.img" where-as almost all recovery files have a unique name since they are all already custom.
Click to expand...
Click to collapse
quite a dilemma, I wonder if we could add pause to the script until everything is loaded on the first boot then after the pause the script flahes the recovery and more importantly the kernel!!! if this was possible we could keep the files in a separate place on the SD card.
Still nothing like S-off!!! Thanks HTC for being so dev friendly
seansk said:
quite a dilemma, I wonder if we could add pause to the script until everything is loaded on the first boot then after the pause the script flahes the recovery and more importantly the kernel!!! if this was possible we could keep the files in a separate place on the SD card.
Still nothing like S-off!!! Thanks HTC for being so dev friendly
Click to expand...
Click to collapse
I'm sure there's a way to add a delay timer of some sort. I'm just not that savvy. Easiest way would be through an app like Tasker.
DEFINITIONOFREAL said:
Would this be a possible solution to our kernel flashing problems, I know it works for the evo
Sent from my HTC Amaze 4G using XDA App
Click to expand...
Click to collapse
The short answer is yes!
I've setup the application to support the HTC Amaze 4G, but before I release it publically and officially, I want to have a few testers confirm everything is working properly for them.
Posted all the information in a new thread as this one seems to be covering a few different topics so I didn't want to "hijack".
http://forum.xda-developers.com/showthread.php?p=21574722
Thanks for the request and for reaching out to me DEFINITIONOFREAL.
Binary100100 said:
Once I see that they do I can work out something else like:
kernelupdate
recoveryupdate
kernelupdate would be
flash_image boot /sdcard/kernel/*boot*.img
recoveryupdate would be
flash_image recovery /sdcard/recovery/*recovery*.img
So that if you place ANY of the appropriate img file in the perspective folders on the sdcard partition it would flash the .img by just entering either of the two commands from adb shell or terminal.
But I'm not going to waste my time if the devs don't want to use it.
Click to expand...
Click to collapse
I think my application, Flash Image GUI, will be the best alternative, but of course I have a biased opinion!
Regarding alternatives, I think a simple sh script which takes an argument would make a nice wrapper. The argument would be location to the image file to flash. The script could either bundle the flash_image binary or take the location of it as another argument.
All depends on how the developers want to create some type of standard. Which is another great reason Flash Image GUI will work well as it contains everything required and doesn't rely on developers providing support in their ROM, only relys on developers following the standards for ROMs and kernel .zip files.
Also, in looking through some of the custom ROMs and kernel .zip files for this device, I notice one of the custom kernels does something similar to the suggestions above, it executes a file located in /system/etc/init.d on every boot which automatically flashes /system/boot.img file.
At first glance I was horrified to see this as this is a *major* security issue. If anybody were to place any type of file in /system/boot.img, either a rogue kernel or just a blank file, the script automatically flashed it on boot w/o any type of file verification or user notification!
Wanted to get that off my chest and discourage the use of *automatic* loading of any type of major file, such as kernel or recovery image, especially without at least file verification or user approval/notification.
I'll try and keep up with the thread and help contribute ideas to alternatives for anybody who wants to develop/implement! Great ideas in the thread and always enjoy reading community collaboration efforts, especially in resolution to manufacturer "adjustments" of standards.
ugh, sorry about the double post (too excited for being too early in the morning). if a moderator wants to combine my last two posts, please do. i dont have access to delete a post.
joeykrim said:
I think my application, Flash Image GUI, will be the best alternative, but of course I have a biased opinion!
Regarding alternatives, I think a simple sh script which takes an argument would make a nice wrapper. The argument would be location to the image file to flash. The script could either bundle the flash_image binary or take the location of it as another argument.
All depends on how the developers want to create some type of standard. Which is another great reason Flash Image GUI will work well as it contains everything required and doesn't rely on developers providing support in their ROM, only relys on developers following the standards for ROMs and kernel .zip files.
Also, in looking through some of the custom ROMs and kernel .zip files for this device, I notice one of the custom kernels does something similar to the suggestions above, it executes a file located in /system/etc/init.d on every boot which automatically flashes /system/boot.img file.
At first glance I was horrified to see this as this is a *major* security issue. If anybody were to place any type of file in /system/boot.img, either a rogue kernel or just a blank file, the script automatically flashed it on boot w/o any type of file verification or user notification!
Wanted to get that off my chest and discourage the use of *automatic* loading of any type of major file, such as kernel or recovery image, especially without at least file verification or user approval/notification.
I'll try and keep up with the thread and help contribute ideas to alternatives for anybody who wants to develop/implement! Great ideas in the thread and always enjoy reading community collaboration efforts, especially in resolution to manufacturer "adjustments" of standards.
ugh, sorry about the double post (too excited for being too early in the morning). if a moderator wants to combine my last two posts, please do. i dont have access to delete a post.
Click to expand...
Click to collapse
I look forward to tryin out your app.
It was basically what this thread was all about in the first place.
The clockwork method that you mentioned is the only workaround that I was able to come up with for custom kernels (like Faux123) because a kernel cannot be flashed through recovery without s-off. Really stupid. So I started thinking "How can we flash a boot.img file from recovery without the typical means?" Then came up with the solution to flash_image the boot.img file automatically IF the file is detected. But how to start a script automatically upon boot? init.d is the only way I could think of. Okay... so where to put the boot? I tried the sdcard but it failed to mount until it was way too late. So... data. Nope... still didn't mount in time. Cache? Well... how many developers will include a cache file into their roms? So the only other option was /system and it seemed convenient since /system mounts BEFORE the script can run (obviously) so that's why it is as it is. I also figured "If someone wants to flash a new kernel all they need to do is push the boot.img to /system and reboot." Must easier than using the EKF method (requiring PC access) and I don't know about you but I'm not around a computer 24/7.

Categories

Resources