Remove APK thats stalling boot - Hero CDMA Themes and Apps

I'm using Fresh Rom 2.1 and I accidentally used Fresh Kitchen to install a 1.5 version of Sprint TV and the Sprint TV Widget on my Hero. After the automatic reboot, it goes to a black screen and never finishes booting.
After talking with fresh, i used adb to remove the Sprint_TV.apk and Sprint_TVWidget.apk from the system/app directory but the phone still does not boot.
Do the apk's need to be unregistered somewhere? Is there anything I can do to get this to boot without using a nandroid restoration? (my last one is two months old :/ )

re:
have you tried also removing the .odex of those files. I dunno if it would acttally make the .odex's during boot but worth a try right?

where are the odex files located? sorry for still being a little noob at the FS

In my honest opinion, this is why noobs shouldn't learn how to mod their phones with 1-click solutions. You learn more about the phone doing it the manual way.
But to answer your question, the .odex files are in the same directory that the app itself was. For example, Cats.apk and Cats.odex are both in /system/app. The commands to remove them would be:
adb shell
cd system/app
rm Cats.apk
rm Cats.odex
Please note that I'm only using Cats.apk and .odex as an example

Check /data/app and /data/app-private for any thing to do with the apps.
Try to wipe dalvik cache and reboot first.

@mrinehart - all us noobs have to start somewhere but thank you for the location of the odex files. After doing an ls determining the name of the apk file the first time, no odex files were listed in that directory.
@Jus10o - There was a second copy of Sprint_TV.apk in the data/app-private. I removed this file and the phone still did not want to come up. At this point i'm assuming its not necessarily the app that corrupted the boot but the way it was installed. I'm doing a factory reset and starting over tonight.
Thank you both for your time!

savesheep said:
@mrinehart - all us noobs have to start somewhere but thank you for the location of the odex files. After doing an ls determining the name of the apk file the first time, no odex files were listed in that directory.
@Jus10o - There was a second copy of Sprint_TV.apk in the data/app-private. I removed this file and the phone still did not want to come up. At this point i'm assuming its not necessarily the app that corrupted the boot but the way it was installed. I'm doing a factory reset and starting over tonight.
Thank you both for your time!
Click to expand...
Click to collapse
I hope I didn't come off as rude but before you RUU (if thats what you mean by factory reset), try clearing your dalvik-cache and wipe DATA.

It's alright, you had a valid point.
Unfortunately I didn't see the first post about clearing the dalvik-cache folder It's been almost a day without the phone so I had to go ahead and RUU it.
HOWVER, I DID do a nandroid backup of the system while it was in its reboot loop phase. I'm very curious as to what caused it and if clearing the dalvik-cache folder would fix it or not so I may revert to that nandroid backup at a later time just to attempt a solvent. I'll update you if I do.
Thanks again

Related

moving dalvik-cache to /cache ???

saw this over here...
http://andblogs.net/2009/05/quick-hack-save-tons-of-space/#more-1660
Quick Hack: Save Tons of Space
Posted on May 8th, 2009 in Android Hacking by Disconnect Tagged cupcake, customize, G1 & ADP1, hacking, howto, kernel, space
So I was looking at my phone, and under 1.5 my dalvik cache was 31 megs (!!!). Rather than move apps to SD (I use my sd card for other stuff, and my apps are only 15 megs anyway) I began thinking.. what else could I move? Aha!
Here are the directions for moving dalvik-cache to /cache, which is unused on these images anyway (it is only for OTA updates.)
There is no fancy installer or much support, and there may be bugs (I only just did this today.)
Its pretty easy. And, so far, works well for me This walkthrough isn’t going to be particularly handholding, but if you need more help try the comments.
Just boot up a capable recovery image (such as JF’s) and mount up /cache and /data.
view sourceprint?
1.# cd /cache
2.# mkdir dalvik-cache
3.# chown 1000 dalvik-cache
4.# chgrp 1000 dalvik-cache
5.# chmod 771 dalvik-cache
6.# cd /data
7.# mv dalvik-cache dalvik-cache-orig
8.# ln -s /cache/dalvik-cache dalvik-cache
The other thing you need is a new boot.img. This one is tuned for JF’s 1.5 adp1 image, and it may or may not work with anything else. Boot Image Cache to Cache JF1.5-ADP1 (71)
(All it does is create the /cache/dalvik-cache dir if it is missing and make sure the perms on /cache are 771 instead of 770.)
Tadah! If everything works, you can remove dalvik-cache-orig. If not, just flash the backup (you did take a backup, right?)
Enjoy!
(Big thanks to JF for helping with the boot image since I have no dev tools right now, and for testing it out for me too.)
any one try it yet? be nice to free up 70meg more on the phone...
Has anyone tried this?
I tried to follow it, but I dont know what to do with the boot.img.gz file.
I did everything else but I got an unbootable phone afterwards and was forced to do a wipe.
I'm running JF 1.5 ADP1 image.
Any help is welcome.
THanks
this is potentially dangerous. /cache may be cleared under many occasions, so if a modified init.rc is not used, you may have a loop on boot.
even if you have such init.rc file, it would be painful to boot after /cache is cleared.
the ultimate solution is to use haykuro's new spl.
M0E-lnx said:
Has anyone tried this?
I tried to follow it, but I dont know what to do with the boot.img.gz file.
I did everything else but I got an unbootable phone afterwards and was forced to do a wipe.
I'm running JF 1.5 ADP1 image.
Any help is welcome.
THanks
Click to expand...
Click to collapse
if you do not flash the modified boot.img file then you CANNOT move the stuff to /cache .. each time you boot it is mounted non-executable .. the modified boot.img makes it executable each time you boot .. if dalvik-cache cannot execute then your phone doesn't load
LucidREM said:
if you do not flash the modified boot.img file then you CANNOT move the stuff to /cache .. each time you boot it is mounted non-executable .. the modified boot.img makes it executable each time you boot .. if dalvik-cache cannot execute then your phone doesn't load
Click to expand...
Click to collapse
Is this the boot.img.gz linked in that howto up top?
If so, how do I go about flashing it?
I really need a solution. I do a lot of online radio streaming and my memory runs out quick. I'd really like to keep my jf 1.5 setup as I have become quite confortablle with it
M0E-lnx said:
Is this the boot.img.gz linked in that howto up top?
If so, how do I go about flashing it?
I really need a solution. I do a lot of online radio streaming and my memory runs out quick. I'd really like to keep my jf 1.5 setup as I have become quite confortablle with it
Click to expand...
Click to collapse
that boot.img.gz file is an archive .. extract the boot.img file out of it to the SD card and then it's something like:
flash_image boot /sdcard/boot.img
or something like that in Terminal .. and then just reboot
And is this done in just terminal or do I need to boot the recovery console?
M0E-lnx said:
And is this done in just terminal or do I need to boot the recovery console?
Click to expand...
Click to collapse
i can't even justify that line of questioning
LucidREM said:
i can't even justify that line of questioning
Click to expand...
Click to collapse
That is the most eloquent response of that nature I've ever seen. I wish I could +1 rep you for that
I gave it a shot, keep getting an error " cannont rename 'dalvik-cache': No such file or directory!
Using RA 1.2.3
ROM
prophetz said:
I gave it a shot, keep getting an error " cannont rename 'dalvik-cache': No such file or directory!
Using RA 1.2.3
Click to expand...
Click to collapse
what ROM are you using? if you already have some form of apps2SD running your dalvik-cache may already be moved .. or you may have mistyped something

[MOD][12/03/09] ADB Remount, Superuser, and Busybox

I'd been trying to figure out how to set up a few simple things in my rooted, post-MR, but otherwise stock CDMA Hero. Namely, ADB Remount permissions (/default.prop file), set up Superuser to properly manage permissions for apps that require root, and install Busybox. Ideally, I wanted to set these up manually. Turns out it's not as simple as one might hope. ADB Remount, for example, requires that you modify and repackage the boot.img/recovery.img.
So, what I've got here is a minimal update.zip file you can apply to your phone via the recovery console. Nothing crazy, it's just MoDaCo's ROM 1.1, but with everything taken out except for the aforementioned items. Once you patch your phone, just these items will be configured and your phone will still look, run, etc. the same as before. Also, a2sd will be copied to your /system/bin directory, but it's something that had to stay in the file for some reason, otherwise the phone wouldn't boot. Probably a setting Paul built into the boot.img.
In any case, here it is. It's working well for me. Hope it helps some of you out too.
****
Thanks goes to Paul of course (MoDaCo) camalot (Droid Explorer) and dagnasty for telling me about the auto-sign plugin that's available in Droid Explorer.
Instructions for manually installing Busybox over here:
http://forum.xda-developers.com/showthread.php?t=591303
****
I responded on ppcgeeks:
mercado79 said:
IAlso, a2sd will be copied to your /system/bin directory, but it's something that had to stay in the file for some reason, otherwise the phone wouldn't boot. Probably a setting Paul built into the boot.img.
Click to expand...
Click to collapse
Yup. It's a script that was added to the boot.img-ramdisk that copies all of your apps to your sd when apps2sd's requirements are met.
So if the sdcard is not partitioned correctly then ap2sd will not run, yes?
Smacky55 said:
So if the sdcard is not partitioned correctly then ap2sd will not run, yes?
Click to expand...
Click to collapse
"Correctly" is relative. If there is no EXT partition on the sdcard, then the ROM won't try to move your applications to it. But the script runs regardless.
Sorry, meant if sdcard isn't partitioned at all. Thanks for the answer.
flipzmode told me in another thread that even though this script is included, that doesn't mean that the update.zip i posted will enable apps2sd for anyone. there's more required in order to get it to work (i stripped most everything out).
A few simple questions. re -stock 1.56... rom
1) in the zip system folder, its refers to /xbin ; does that require that /system/xbin be pre-existent, or will it create it ?
2) busybox is in /system/bin on mine. Do I need to remove it?
a) if so then due to the "busybox --install -s /system/bin"
command , how do i remove the current symbolic busybox entry points?
b)have $PATH changes been applied to overwrite the current export
3) empty init.sh file?
4) google meta references?
I think I may understand the need to get bootstrap-"root" permissions established, is there another way as well?
Thanks for dealing with these noobie questions.
Thanks for this. worked out great.
willy900wonka said:
A few simple questions. re -stock 1.56... rom
1) in the zip system folder, its refers to /xbin ; does that require that /system/xbin be pre-existent, or will it create it ?
2) busybox is in /system/bin on mine. Do I need to remove it?
a) if so then due to the "busybox --install -s /system/bin"
command , how do i remove the current symbolic busybox entry points?
b)have $PATH changes been applied to overwrite the current export
3) empty init.sh file?
4) google meta references?
I think I may understand the need to get bootstrap-"root" permissions established, is there another way as well?
Thanks for dealing with these noobie questions.
Click to expand...
Click to collapse
sorry willy man. not sure what i can tell you. i'm pretty close to being a newbie myself. i never fully understood what the script was doing. i simply took the original modaco update and compared it to another script paul had posted on his forums last fall.
if you unzip the file, you should be able to see everything that's going on. the file structure is super simple, so modify it to suit your needs and give it a try. worst case, you'll need to revert to a nandroid backup. oh, and don't forget you'll need to sign the file and zip it back up in order to flash it onto the phone.
come to think of it, i guess maybe i should update the script using the latest modaco rom, though i'm not sure how helpful it'd be for everyone. to be honest, i've since bitten the bullet and moved on to flipz's rom and the gumbo kernel. runs beautifully!
Ok, so I formated the card, put the .zip file on the sdcard and tried to press home+power to enter the recovery council. When I hold home and press power I am taking to a screen that has an exclamation point and an image of the phone.
Can anyone help?
partylatino420 said:
Ok, so I formated the card, put the .zip file on the sdcard and tried to press home+power to enter the recovery council. When I hold home and press power I am taking to a screen that has an exclamation point and an image of the phone.
Can anyone help?
Click to expand...
Click to collapse
Boot the phone by holding home only. And...I'm assuming you have the recovery console installed and are rooted.
I think the problem is that a recovery boot image was not previously installed. A green screen with a set of options should've appeared.
http://forum.xda-developers.com/showthread.php?t=596879
I prefer 1.2.3
mercado79 said:
Boot the phone by holding home only. And...I'm assuming you have the recovery console installed and are rooted.
Click to expand...
Click to collapse
I did root the phone but I am not familiar with the recovery council. I tried to search for this but was unsuccessful.
I just got my Hero last week so I am still new to all of this. Can you point me in the right direction?
partylatino420 said:
I did root the phone but I am not familiar with the recovery council. I tried to search for this but was unsuccessful.
I just got my Hero last week so I am still new to all of this. Can you point me in the right direction?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=596879 explanation
code from : http://forum.xda-developers.com/showthread.php?t=583291
13:
Code:
adb push recovery-RA-heroc-v1.5.2.img /sdcard
Pushing is equivalent of copy the file to the root of your sdcard. By the time you finished reading this it should be done. You'll know its done because the ouput will say something like transferred X bytes in X secs.
14:
Code:
adb shell reboot
This will cause the phone to restart automatically. Wait till it is fully booted to continue.
http://tinyurl.com/yc96j2z
partylatino420 said:
I did root the phone but I am not familiar with the recovery council. I tried to search for this but was unsuccessful.
I just got my Hero last week so I am still new to all of this. Can you point me in the right direction?
Click to expand...
Click to collapse
Your google search didn't turn anything up on "recovery council" because the operative use would have actually been "recovery console"..
that did it!! Thanks guys!!!
um, what???
mercado79 said:
So, what I've got here is a minimal update.zip file you can apply to your phone via the recovery console.
Click to expand...
Click to collapse
Apply via the recovery console? Sorry, still very new to this. Thanks!
Recovery Console
Go to the recovery console by holding down home when you power your Android. In that menu, you should see something that says 'flash update from SD card'... or something like that... then you choose the .zip that he has so kindly provided us.
Oh, and you have to put the .zip file that he provided on the SD card if that isn't already obvious :/
I also renamed it update.zip once I copied it to my SD card. Hope this clears it up a little. I just rooted my Hero yesterday.. so I am on the same NOOB level.
Do I need to wipe before flashing this / will this wipe my phone if I flash it?
fallonjp said:
Do I need to wipe before flashing this / will this wipe my phone if I flash it?
Click to expand...
Click to collapse
You shouldn't need to wipe your phone; however I really don't think it's a good idea to use this. I put this together last year when we were still running Android 1.5 so it's WAY out of date. Just go with Nfinite's ROMs. He keeps them almost completely stock (depending on which you choose) and they can serve as great back-up / go-to ROMs.

Now that root is getting closer, PLEASE BACK UP!!

If you want to delete an app, change a file or whatever when you get root, please be smart about it. Think before you delete something. Have a plan B (a failback plan). If you don't know how you will fix whatever you're about to potentially break, DON'T DO IT.
Try to learn ADB. I know it's not for everyone, but it may pull you out of the fire later. Think before you do anything.
No matter what Android device it is, someone always has a post saying "Help! I deleted <insert app here> and I need it back!" Here are some tips:
Don't freeze or delete an app using Titanium Backup without knowing if it will crash your phone or not
If you're using ADB, rename a file instead of deleting it if you're not sure if it will crash your phone or not
Your /system folder is like the base operating system folder (think C:\Windows); before you change something BACK IT UP!
Code:
adb pull /system <destination_folder>
Since we only have temp root for now, if you're disabling packages, back up the packages.xml file
Code:
adb pull /data/system/packages.xml <destination_folder>
Learn from others' mistakes; if someone bricks their phone, read the thread and figure out how NOT to screw yourself and your phone
Heard of measure twice, cut once? Read three times, execute once. Listen to the Devs. Be nice to them. Don't piss them off. They do this on their own time.
Please be smart about whatever you do to your phone. We can't be dumb smart phone users. If you don't know something, ask in the appropriate section or thread. If you know something, don't tease others for not knowing. The occasional flame is funny and all, but at some point someone has to learn whatever they don't know - someone is going to have to step up and help them.
Thanks dawg...
I think and SD backup and Nandroid recovery backup on root will be good enough? <not condascending...just asking from your adb opinion?>
ROM_Guest said:
Thanks dawg...
I think and SD backup and Nandroid recovery backup on root will be good enough? <not condascending...just asking from your adb opinion?>
Click to expand...
Click to collapse
I think of that as another layer. We're not there with the Sensation yet, but I always think it's a good idea to use any and all methods best suited for what you're doing.
For example, if you're flashing a theme someone customized which could change multiple apk and jar files, a Nandroid backup is best.
When someone goes to remove an apk or freeze an app, they usually don't think to take a Nandroid backup (because deleting or freezing takes only a second - Nandroid backups take longer).
1) we don't have that functionality yet and 2) it's very common for someone to try to freeze a critical app which can cause a boot loop, which can easily be fixed by adb (if a Nandroid is not available).
i tried:
adb pull / backup/
it started building a file list and then started the copy. after a time (dont know excatly when because i let it run beside) it stoped working at:
pull: /sys/devices/platform/msm_adc/batt_id -> backup/sys/devices/platform/msm_adc/batt_id
nothing more happend. now i got 4883 files, a total of 3.1 GB, backup directory. but it seems not all files are in. when i browse through the phone dir i see much more files in the dirs.
is there any other way of getting a complete backup? when i rerun the command will it skip the files it allready dumped to disk? any other command?
thx!!!
daSn00p said:
i tried:
adb pull / backup/
it started building a file list and then started the copy. after a time (dont know excatly when because i let it run beside) it stoped working at:
pull: /sys/devices/platform/msm_adc/batt_id -> backup/sys/devices/platform/msm_adc/batt_id
nothing more happend. now i got 4883 files, a total of 3.1 GB, backup directory. but it seems not all files are in. when i browse through the phone dir i see much more files in the dirs.
is there any other way of getting a complete backup? when i rerun the command will it skip the files it allready dumped to disk? any other command?
thx!!!
Click to expand...
Click to collapse
All you really need is /system and /data if you want a complete backup. I know you see other files+folders, but those are mounted by the OS and kernel... or whatever. Someone with more Linux experience can explain better than I can. But if you want a complete backup, just get /system and /data.
The /system folder is like getting the base OS. The /data is all your user/personal data.
dumping /system worked fine: 1366 files pulled. 0 files skipped.
when trying to dump /data it freezes again and allways again at:
pull: /data/d/smem_log/dump_cont -> ../backup2/data/d/smem_log/dump_cont
so i dumped every dir in data manually only /data/d is missing now. but there are so many dirs in it, i dont want to dump every dir on its own
any idea?
daSn00p said:
dumping /system worked fine: 1366 files pulled. 0 files skipped.
when trying to dump /data it freezes again and allways again at:
pull: /data/d/smem_log/dump_cont -> ../backup2/data/d/smem_log/dump_cont
so i dumped every dir in data manually only /data/d is missing now. but there are so many dirs in it, i dont want to dump every dir on its own
any idea?
Click to expand...
Click to collapse
That should be good enough for now. No one else is doing this manually, so until we get an official root this is all you can do to backup. Once we get permanent root, titanium backup will do most of this for us.
I would only make backups of anything you change or delete at this point, but that's just me.
Sent from my HTC Sensation 4G using XDA App

[Q] HELP - no build.prop

I just applied Daoist's CWM stock ROM update (should still be rooted, right?). It came up first time.
Then, I modded my build prop (set dpi to 120 because I like it that way). But maybe I screwed up the file name in Root explorer, because now I'm in a boot loop and if I try ADB PULL /system/build.prop it says "file not found."
I can't get SU through adb, so can't push build.prop to /system. ADB remount returns an error. permission denied. Transformer won't boot, so I can't do anything from it.
I CAN get to cwm, and have been trying to create an update.zip that will just copy build.prop to /system, but everything I have tried quits with "install aborted" message.
What can I do?
restore a nand and dont try and **** with it again, lol. no but really, restore a nand and then copy your build. prop and make a flashable zip and place on your sd card in case it happens again, so you can just flash it in cwm.
Resolved..
Well, why go back when you can go forward?
I went ahead and installed the Prime ROM. Looks like it is eating all my currently installed apps.
Y'all should know, though, that if your system can't find a build.prop it won't start. You can ADB to it and have a rudimentary set of commands, but your ability to significantly alter anything in your file system will be prohibited.
Lesson learned.
glg
as a side note most editors in android rename system files when you change them to "nameoffileyouedited".bak so if you pull and rename that file that might have fixed your problem. also try lcd dencity changer from the market. its a little less hazordous
mrevankyle said:
as a side note most editors in android rename system files when you change them to "nameoffileyouedited".bak so if you pull and rename that file that might have fixed your problem. also try lcd dencity changer from the market. its a little less hazordous
Click to expand...
Click to collapse
That is true. I had backups. But without a build.prop, the virtual machine won't start. There is no way to do a file operation to replace the backup. At least none that I found. I had to flash the whole system.
glg

How I was able to recover from a soft brick and what I've learned.

I'm posting this information because 1 I was asked to and 2 I feel it could be helpful for the "MORE ADVANCED" users.
Do Not try any of my methods, None of them. Unless you WANT to brick your phone.
With that said, here to the best of my memory is what I have done.
I pulled my framework-res file as well as the other 3 that relate to it and tried to theme them. It worked a few times and after tweaking I eventually broke the permission of the files.. Hence putting me in a bootloop.
What I did..
Thankfully I had the Bionic Safestrap installed. (DO NOT INSTALL THE SAFESTRAP) So, I was able to boot into the safestrap and use adb commands. This took some toying around. For the sake of saving people from bricking i'm not going to list all of the adb commands. But I had to mount both the /sdcard and /systemorig. Now simple enough, I just went through and rm every file from inside the folders. (Do not rm the folder, You will not be able to recover the folder and no you can not push the folder) rm all files from /systemorig /apps /osh etc.. then push all my restore files (backup made with safestrap) to the /sdcard. (For some reason they have to be placed on the sdcard before being copied to the root directory otherwise it breaks the permission of the files, idk y?) A few times in order to mount /systemorig as full rw I had to quick toggle safe mode. Now cp all files from the sdcard to their places on the phone turn safe mode off if you had to enable it and reboot. Bam, You just recovered from a soft brick. I have also used this method to restore webtop after breaking that also. Yes it does take a long time to restore and it is cumbersome but at least you can do it. I was also able to mount /emmc to /sdcard and flash a rom from the razr (yes i knew at this point it wouldn't work, this was a test) although it did not boot it did unpack and fully install the rom in the correct locations and it looked as though it would with a little more code boot from the sdcard. What i'm playing with now is trying to use the overclock method from the razr on my a2 but seems how I don't know exactly what files are being changed i'm being cautious. Sorry guys I'm not exactly a linux guy, I do what I can and I am always learning.
I'll edit this post as more info comes to mind. But to let you know I have been able to play with most files w/o fear of bricking so long as you don't mess up the .rc files in /systemorig you will always be able to boot into safestrap.

Categories

Resources