I have a CWM 3.0+ updater-script question - Thunderbolt Q&A, Help & Troubleshooting

Hello all,
I have written a script to push as file to my TB and it works kind of...I just want to know why it is not functioning as it should.
Here is what I am attempting to do.
Since my HTC weather does not have my city listed and my weather is always way off, I hacked the HTC weather database to add my city. And it works great.
So I wanted to create a weather_update.zip to install using CWM to do all of this for me if I changed roms and to allow others to use it as well.
the file goes into the /data/data/com.htc.provider.weather/files directory.
My script mounts data, pushes the file, changes the appropriate permissions, then unmounts.
It works as intended because I can see the file using adb prior to reboot.
However, after a reboot, the file is overwritten by the original. I can even delete the file completely, reboot and it is rebuilt. So my modified file does not stick.
BUT, if I use root explorer and copy the file to the correct directory and change permissions, my modified file works even after a reboot.
I don't understand why it works one way but not another.
Is there a step I am missing in the updater-script?
Any help would be appreciated....
Thanks,
Scott

UPEngineer said:
Hello all,
I have written a script to push as file to my TB and it works kind of...I just want to know why it is not functioning as it should.
Here is what I am attempting to do.
Since my HTC weather does not have my city listed and my weather is always way off, I hacked the HTC weather database to add my city. And it works great.
So I wanted to create a weather_update.zip to install using CWM to do all of this for me if I changed roms and to allow others to use it as well.
the file goes into the /data/data/com.htc.provider.weather/files directory.
My script mounts data, pushes the file, changes the appropriate permissions, then unmounts.
It works as intended because I can see the file using adb prior to reboot.
However, after a reboot, the file is overwritten by the original. I can even delete the file completely, reboot and it is rebuilt. So my modified file does not stick.
BUT, if I use root explorer and copy the file to the correct directory and change permissions, my modified file works even after a reboot.
I don't understand why it works one way but not another.
Is there a step I am missing in the updater-script?
Any help would be appreciated....
Thanks,
Scott
Click to expand...
Click to collapse
I could be way off base here but wouldn't you have to recursively delete the original to keep it from rebuilding?

dbu said:
I could be way off base here but wouldn't you have to recursively delete the original to keep it from rebuilding?
Click to expand...
Click to collapse
LOL, what I was thinking too, but it doesn't seem to work, unless I am doing it wrong.
If I replace the file and reboot, the original rebuilds.
If I delete the file completely and reboot, the original rebuilds.
If I replace the file using root explorer after phone has booted and then reboot, my modified file sticks.
That is what I can't figure out. Why it sticks after OS has loaded but rebuilds if the same file is placed before reboot.
And I can't figure out where the file is being rebuilt from.
Uggggg.

Related

[Q] how to pull an .apk and install in another ROM

I have installed a ROM that removed a lot of bloat including the DockMode.apk which I use daily when at my desk.
I have pulled the DockMode.apk from a stock rom, and from a modified rom and I cannot get either to install using Root Explorer, APK Installer or ES File Explorer.
I was unsure if this was as easy as it seemed.
I simply extracted the ROM files, pulled the .apk from system/app and copied it to my phones SD and attempted to install it.
The file transfers to the phone fine, and the DockMode icon is there with the 331 kb file. But I get the message (install failed) when using all three of the install applications.
Any suggestions, I really do need to find a way to make this work.
Put it in system/app
Sent from my PG86100 using XDA Premium App
sandiegopaneraiguy said:
I have installed a ROM that removed a lot of bloat including the DockMode.apk which I use daily when at my desk.
I have pulled the DockMode.apk from a stock rom, and from a modified rom and I cannot get either to install using Root Explorer, APK Installer or ES File Explorer.
I was unsure if this was as easy as it seemed.
I simply extracted the ROM files, pulled the .apk from system/app and copied it to my phones SD and attempted to install it.
The file transfers to the phone fine, and the DockMode icon is there with the 331 kb file. But I get the message (install failed) when using all three of the install applications.
Any suggestions, I really do need to find a way to make this work.
Click to expand...
Click to collapse
It's most likely failing because it's a system app, and needs to be pushed to the /system/app folder. You can do that with adb, or you can just use root explorer. To use adb, do this:
adb remount system
adb push HtcDockMode.apk /system/app (or whatever the .apk is called)
adb reboot
Or using root explorer, take the .apk and paste it into the /system/app folder. (You must make sure to set it as r/w using root explorer). Then long press on any apk in your /system/app folder, and press permissions. Notice what they are set to, and then make sure the permissions on your dockmode.apk are set the same as all the other apps in your /system/app folder. Then reboot when you're done. That should work. If it doesn't work, then it most likely means that the htc dock mode app is dependent on something else that's been removed.
I tried both the adb push method and the root explorer method, checked the permissions and attempted to install.
Still get the "installation failed" message. So there must be something else that has been changed.
Thank you kindly for the efforts. I will try to find another ROM that is similar and still has this feature.
if you really want to get technical, monitor logcat and it should split out the real reason why it is throwing the installation error.
adb logcat, adb shell logcat or ddms are three ways to access it.
if you want to pastebin your logcat, careful as there is private/sensitive data in there sometimes, we can take a lot and try and figure out the exact error.
as mentioned above, it probably has a dependence. logcat *should* tell us which dependency it is missing when it throws the install error.
figured i would present the option, even if its not the easiest. logcat is the easiest developer route to determine the issue, in my opinion. hope that helps!
sandiegopaneraiguy said:
I tried both the adb push method and the root explorer method, checked the permissions and attempted to install.
Still get the "installation failed" message. So there must be something else that has been changed.
Thank you kindly for the efforts. I will try to find another ROM that is similar and still has this feature.
Click to expand...
Click to collapse
Once you put it in /system/app you don't click install. Just reboot.
Sent from my PG86100 using Tapatalk
k2buckley said:
Once you put it in /system/app you don't click install. Just reboot.
Sent from my PG86100 using Tapatalk
Click to expand...
Click to collapse
WOOHOO... that was it! I kept thinking I need to "install it".
I went back in, set all the permissions and rebooted and it works like a charm!
Thank you very much!

[Q] installed app. app disapeared. cant reinstall

ok.... I have Samsung Fascinate.
PWGB2.0 beta3 ROM
I found the zip containing on here(XDA) somewhere containing the BuddiesNow app for my phone and installed it. I then found the BuddiesNow for Vibrant tweaked for the Fascinate. I went to /system/app and located my BuddiesNow I had placed in there 1st and renamed it .bak
I then placed the Vibrant BuddiesNow app in the /system/app folder.
It worked great. I discovered I liked the Vibrant BuddiesNow app much better.
*************
ok... now my issue. I picked my phone up ealier this week and went to use my Vibrant BuddiesNow app and it was gone. I then long pressed the blank screen and pressed Widgets from the list that popped up. I scroll thru the list and BuddiesNow does not show up in the list.
I then open my file manager and navigate to /system/app folder and BuddiesNow is not in there. Not even the .bak file version.
I then go to my SDcard and find the copy of the Vibrant BuddiesNow app I had originally stored in a folder there and tried to copy it to the /system/app folder. The error message pops up saying that the file already exist and cant paste the file here.
I then booted into recovery, tried wiping partition cache and dalvik cache.
That did not help any. Got same result when I tried to move the file to /system/app folder again.
I then thought I would be cleaver and rename the Vibrant BuddiesNow in my SDcard folder to [BuddiesNow.apk.grid] and then move it to the /system/app folder. AND THEN AFTER PLACING IN THE /system/app FOLDER, RENAME IT TO .APK
That did not work either! It also diappeared.... now I have BuddiesNow.apk,
BuddiesNow.apk.bak, BuddiesNow.apk.grid, all in the /system/app folder and all invisible.
I had the file manager settings to SHOW HIDDEN FILES from the beginning.
I also have tried the SEARCH function in the file manager but it shows no results. I have tried installing many file manager apps and attempting to see if a different file manager would show the files but none did.....
I tried to write this episode as short as possible.. this is the best I could do to cover al the bases...
what could be a fix????????? PLEASE ADVISE! I LOVE MY BUDDIESNOW!
Come one...anyone? I love my buddiesnow app. Please help me out here
hard to belive
hard to believe someone has not seen this before and has an idea how to fix it...
I love this forum anyways
File exists, How about overwrite the file?
Accidentally sent from my Google Nexus S using XDA Premium
melvinchng said:
File exists, How about overwrite the file?
Accidentally sent from my Google Nexus S using XDA Premium
Click to expand...
Click to collapse
OVERWRITE FILE is not an option to choose... in this particular problem with this
particular apk disappearance, the option to overwrite is not there.
I have had the overwrite option at other times but not now with this issue fo who know what reason.
I am going to factory reset I guess and start over.
hasn't anyone else had the same issue?
Not sure if this would be helpful but when I had a similar issue I just used titanium backup and found the file that "already existed" and removed it. Also, you can use any file manager that allows you to sort by date modified and look for any buddynow files that may be in a folder that you didn't think about looking in
did you maybe moved the app to your sdcard ? sometimes app's widgets wont show if you move them to sdcard.If you did so move it back to the phone's memory
YoungSinema said:
Not sure if this would be helpful but when I had a similar issue I just used titanium backup and found the file that "already existed" and removed it. Also, you can use any file manager that allows you to sort by date modified and look for any buddynow files that may be in a folder that you didn't think about looking in
Click to expand...
Click to collapse
I used the search function in the various file managers I have tried & even searched the entire phone (and also the /system/app )for he disappeared files and got no results...when I get some time next week I am going to sit down and factory reset my phone and start all over.
if it works I will not try the vibrant version of buddiesnow on my phone again,
I will just use the fascinate version of buddiesnow. (the vibrant version sure was nicer tho)....

How to Change Galaxy S3 Touch Sound

Can anyone here help or assist me, How to change the Galaxy S3 Touch Sound???
changing system sounds
Devils77 said:
Can anyone here help or assist me, How to change the Galaxy S3 Touch Sound???
Click to expand...
Click to collapse
This requires root!
The sounds (by default) are stored in /system/media/audio/ui/
!NOTE: This is for system/OS sounds. Notifications etc are not stored here!
Screen touch sound is "TW_Touch.ogg" and back and menu button sounds are "S_HW_Touch.ogg"
If you would like to change the sound to something else, find a mp3 or something that you would like to use then convert it to a .ogg format.
Can be done on this website: htt$p://audio.on$line-convert.$com/convert-to-ogg *Remove $ symbols from URL
Then rename your new .ogg to either "TW_Touch.ogg" or "S_HW_Touch.ogg" dependent on what sound you would like to change.
Place the .ogg file on your sd card and move it the mentioned directory and overwrite (delete) the original .ogg file (backup first).
Then remember to set the permissions of the .ogg file to "rw-r--r--" and make sure it is named correctly, it is case sensitive.
Reboot system and enjoy your new sounds :good:
I tried everything that you said and it doesn't work for me. When i try to move/overwrite the file it tells me "Cannot copy or move file". When i try to delete the orginal file first it tells me "Warning - Could not delete". I am on stock rom and rooted. When i try to change permissions to the original files it gives me error "unable to chmod /system/media/...bla bla". What to do?
Ok. I got it. Thanks for everything!! Thumbs up!
vibrophonique said:
I tried everything that you said and it doesn't work for me. When i try to move/overwrite the file it tells me "Cannot copy or move file". When i try to delete the orginal file first it tells me "Warning - Could not delete". I am on stock rom and rooted. When i try to change permissions to the original files it gives me error "unable to chmod /system/media/...bla bla". What to do?
Click to expand...
Click to collapse
Your root has failed, download root checker to see.
If it fails you will need to re-root with CF-Root.
Very Awesome. Thanks for the help.
I am running into an issue. My phone has been verified as rooted by rootchecker. The only way I can see the root directory on the phone is with Astro File Manager. Once in the correct folder, I can see the TW_TOUCH.OGG file and have a replacement. However I can't write to the folder. I can't even rename the original. Checking the properties of the file I don't see any notations that the file or folder are write protected. I assume the entire drive is per se with the exception of the \SDCARD directory.
Is there a better tool for doing all this? I'd like to have something I can use from a PC as well.
Thanks,
Karl
Use Super Manager or Android Commander .
jje
First you need to Root.
There are good guides around here.
I'd recommend ES File Explorer
Download it then
Open ES File Explorer
Menu > Settings > Root settings.
Check Root Explorer
Click Grant when SU popup appears.
Check Up to Root
and Check Mount File System.
Now it will copy succesfully to the system folder.
Slightly easier
No need to do renaming. Save desired oggs to your ext sd card.
Use Root Browser (ES doesnt seem to go to system no matter)
Use Root Browser. Go to your ext sd card. Long press on the desired .ogg. Copy it.
navigate to the folder l /system/media/audio/ui/ as instructed above.
Click paste. If your file is named correctly it will ask 'replace?' click yes. Do the same for the other file.
Reboot. You have to reboot. How it still plays water droplets before rebooting Idk. But reboot and you back to clicky goodness. (who thought of that water droplet. Chinese water torture.)
Edit: I attached the two files. Change from .txt to .ogg.
operation failed?
maluminse said:
No need to do renaming. Save desired oggs to your ext sd card.
Use Root Browser (ES doesnt seem to go to system no matter)
Use Root Browser. Go to your ext sd card. Long press on the desired .ogg. Copy it.
navigate to the folder l /system/media/audio/ui/ as instructed above.
Click paste. If your file is named correctly it will ask 'replace?' click yes. Do the same for the other file.
Reboot. You have to reboot. How it still plays water droplets before rebooting Idk. But reboot and you back to clicky goodness. (who thought of that water droplet. Chinese water torture.)
Edit: I attached the two files. Change from .txt to .ogg.
Click to expand...
Click to collapse
===========================
Did as per the above but responded "Operation Failed!".
What did I do wrong?
masterex567 said:
First you need to Root.
There are good guides around here.
I'd recommend ES File Explorer
Download it then
Open ES File Explorer
Menu > Settings > Root settings.
Check Root Explorer
Click Grant when SU popup appears.
Check Up to Root
and Check Mount File System.
Now it will copy succesfully to the system folder.
Click to expand...
Click to collapse
Thanks bro...worked for me!!!
help plz
Ok so i ran into a problem. Im using es file explorer and i accidentally changed my keyboard tap sound without backing up the original one. I also didnt look at the permissions before i changed it. Can someone tell me what the permissions are? Thx in advance. Im on a Samsung Galaxy s3. Im working on turning it into a halo themed phone, complete with halo system sounds and even halo themed icons.
officerswaggdaddy said:
Ok so i ran into a problem. Im using es file explorer and i accidentally changed my keyboard tap sound without backing up the original one. I also didnt look at the permissions before i changed it. Can someone tell me what the permissions are? Thx in advance. Im on a Samsung Galaxy s3. Im working on turning it into a halo themed phone, complete with halo system sounds and even halo themed icons.
Click to expand...
Click to collapse
Rw-r-r. In a grid of 1 to 9, top left to bottom right, 1,2,3,4 ticked. 5,6,7,8,9 unticked. Should be immediate but if not, just reboot.
Beamed in by telepathy.
Ok thanks. One more thing is it possible to add system sounds to it? Like a sound when i press the home button?
Sent from my SHV-E210K using XDA-Developers mobile app
shivadow said:
Rw-r-r. In a grid of 1 to 9, top left to bottom right, 1,2,3,4 ticked. 5,6,7,8,9 unticked. Should be immediate but if not, just reboot.
Beamed in by telepathy.
Click to expand...
Click to collapse
Ummm the sound is still the same even tho i overwrited it.
Sent from my SHV-E210K using XDA-Developers mobile app

[Q] How should I de/recompile a system app? What did I do wrong?

Hi,
So the situations is like this:
Just got a new LG Nexus 4, NFC enabled, GREAT!!!!
But then I start using it, and the NFC sound (everytime the phone reads a nfc-tag it makes an sound) annoys me beyond belief.
So I start looking around, it seems there's no solution, except recompiling the app.
So I learn how to compile an app (noob here), using this guide: http://forum.xda-developers.com/showthread.php?t=1860115
I'm up to the point where my apk is decompiled, and I have modified the sound files, located in my decompiled files folder respectively at res/raw/start.ogg & res/raw/end.ogg.
I modded the files using audacity, lowering the volume to zero, used them to replace the original .ogg files. The file size is a bit smaller as the original ones (1Kb difference).
Next I use the recompile command: apktool b decompiled_apk_folder_with_modified_files modded_apk_file.apk
So now I have the new nfc apk file, called NfcNci.apk, with which I replace the original file in /system/app.
Next up I reboot my phone into recovery, wipe all cache and dalvik cache, and reboot again.
First thing that pops up on my screen is a force-close message, saying that the nfc-service force closed.
Anyone who can tell me what I did wrong? Or how I can fix this?
Attached are: my decompiled-files-folder (compressed to zip)
the original NfcNci.apk file
my modded NfcNci.apk file which causes the FC's.
Any help will be greatly appreciated!!!!
S.
Looks like you're still on 4.2
The latest NfcNci.apk has some more files.
And your apk is missing the META-INF folder.
I guess that this is the problem.
But you should use "adb logcat" to ensure we're on the right track.
Micky
1 thing i would recomend is not using the actual apk you just built. instead, open your new apk with a file manager such as 7zip and remove your newly compiled files out of it, then put them into the original apk from your rom using 7zip as well! thus keeping the apk's original signature
try to copy the least amount of files from one to another, so to be safe only pull out your new .ogg files, then put them into your original apk! hope this helps
ldrifta said:
1 thing i would recomend is not using the actual apk you just built. instead, open your new apk with a file manager such as 7zip and remove your newly compiled files out of it, then put them into the original apk from your rom using 7zip as well! thus keeping the apk's original signature
try to copy the least amount of files from one to another, so to be safe only pull out your new .ogg files, then put them into your original apk! hope this helps
Click to expand...
Click to collapse
Hi, I tried this, installed 7zip, and double clicked the original apk, I opende the res/raw/ directory, and only copied the files I was using: start.ogg & end.ogg. Then I close 7zip, and send the file to my phone. But as soon as I it them to /system/apps on my phone, and reboot to recovery, wiping the dalvik cache. I get FC's on reboot (NFC-service has FC'd).
Any reasons for this?
Thanks for the help, both of you!
BTW: I'm on Android 4.3 JB

[Q] Reboot when altering system files

I have two separate issues which I believe are caused by the same thing.
1. When I try to alter platform.xml in the /system/etc/permissions folder via ES File Explorer to enable 3rd party apps to have write capability to the SD card, the edit is unsuccessful and my phone reboots. When I pull a copy of the file to my PC, alter it, and then try to push it via ADB, the same thing happens. I previously used the ADB pull/push method to edit my hosts file and had success with that after doing it while in Recovery, but this time around both ways (in recovery and with the device booted up) result in my device rebooting. For the SD card fix, I've also tried the app that does it for you and encounter the same issue.
2. When attempting to update the SuperSU binary, the update fails my device reboots. This happens with either update method - normal and recovery.
So both issues seem to have the same root cause... my phone will not allow any editing of system files. Anyone have any suggestions?
For reference I'm on a Galaxy Note 4 (model SM-N910T) on T-Mobile.
Baseband version N910TUVU1ANJ7
Android version 4.4.4 (stock ROM)
Kernel version 3.10.0-2796035
Build number KTU84P.N910TUVU1ANJ7
I'm also running Wanam Xposed - not sure if that has anything to do with anything but just fyi.
Thanks
bump... anyone have any ideas?
replace the altered xml with a original/stock one..
If u have a backup
abhinavp649 said:
replace the altered xml with a original/stock one..
If u have a backup
Click to expand...
Click to collapse
I have the stock .xml in there right now... my problem is that I want to replace it, but I can't because my phone reboots every time I try.
Gakuseinozen said:
I have the stock .xml in there right now... my problem is that I want to replace it, but I can't because my phone reboots every time I try.
Click to expand...
Click to collapse
Is your Phone is rooted? If yes:
place the altered .xml somewhere in your sd card.
1. Install an app called Total Commander.
2. Navigate to the location where your stock file is located.(delete it)
3. Now goto sd card where you placed your altered file.
4. Tap on Icon of the .xml file, You will see a green tick mark on it.
5. When your file is selected. Tap on Copy/Move to Icon.( u will see two files one on one with a blue arrow)
6. Now Click on '>>' button to browse the location where you have to Copy/Move the File.
7. Now Tap Copy if You want a backup placed in sd card of the file or move if you just want one file to be there.
(Through all the Process I am assuming that your phone is rooted and you Have Granted SuperUser permissions to Total Commander)
abhinavp649 said:
Is your Phone is rooted? If yes:
place the altered .xml somewhere in your sd card.
1. Install an app called Total Commander.
2. Navigate to the location where your stock file is located.(delete it)
3. Now goto sd card where you placed your altered file.
4. Tap on Icon of the .xml file, You will see a green tick mark on it.
5. When your file is selected. Tap on Copy/Move to Icon.( u will see two files one on one with a blue arrow)
6. Now Click on '>>' button to browse the location where you have to Copy/Move the File.
7. Now Tap Copy if You want a backup placed in sd card of the file or move if you just want one file to be there.
(Through all the Process I am assuming that your phone is rooted and you Have Granted SuperUser permissions to Total Commander)
Click to expand...
Click to collapse
I'm assuming this will end with the same result as when I try it through ES File Explorer. ES has the same capability and I have given it root access already. Something is causing all attempts to alter system files to fail, regardless of root access.
Gakuseinozen said:
I'm assuming this will end with the same result as when I try it through ES File Explorer. ES has the same capability and I have given it root access already. Something is causing all attempts to alter system files to fail, regardless of root access.
Click to expand...
Click to collapse
This was not successful. Anyone else have any ideas? I tried posting logs in the SuperSU update failure thread, with the logic that if I get that issue fixed my other issue will be resolved also, but Chainfire hasn't responded to any of the requests in a while.

Categories

Resources