Building first ROM for G900V - Verizon Galaxy S 5 Q&A, Help & Troubleshooting

Good day, all!
I've been working on [my first] ROM for Verizon S5 and everything seems to be going great! I've cleaned out as much Samsung/Verizon/Google trash as I can, applied some tweaks to build.prop, changed some default apps to (IMHO) better replacements, and anything that is left (functions correctly) has been moved to /data/app so they can be Uninstalled fully (not just Turned Off). Just a few quick questions:
1) How can I "bake-in" app data? I have replaced the normal, crap launcher with Holo Launcher and cannot seem to get correct permissions when the ROM is installed thru SS. I believe the issue is permissions for /data/data/ get screwed up or not set correctly. I have looked and looked and tried to determine the correct permissions, but still no joy. I've tried to fix /data/data permissions in the updater-script, but it seems like each subfolder/file has different permissions making me think I'll have to go thru them one-by-one.
I have a work-around in place using a OneTimeInit script that does work, but it seems like that's not really the best approach?
2) Kind of ties into question number 1, I patched the framework-res.apk in to allow WiFiHotspot, but without being able to install the system settings data properly, there is not a "Quick Shortcut". Again, I've resolved the problem using the OneTimeInit to update Sqlite DBs after the system is up.
3) How do I de-odex the stock ROM? Using Android Kitchen doesn't seem to do it right. It works mostly but I still seem to get various FCs. I tend to believe that some things just cannot (should not) be De-Odex'd?
I've also discontinued Zip-Aligning because it sometimes produces errors on my ROM. Is it not advised to use Android Kitchen to do these tasks or is there some trick to getting it to work just right?
Bonus Question) I was going to share my ROM on XDA but it says I'm not allowed to post in Development. I assume because of my low post count. Any way I can get an over-ride or should I just make a few more posts and then do it?
Thanks again guys!
I appreciate all the help as always!
Jake

jake5253 said:
Good day, all!
I've been working on [my first] ROM for Verizon S5 and everything seems to be going great! I've cleaned out as much Samsung/Verizon/Google trash as I can, applied some tweaks to build.prop, changed some default apps to (IMHO) better replacements, and anything that is left (functions correctly) has been moved to /data/app so they can be Uninstalled fully (not just Turned Off). Just a few quick questions:
1) How can I "bake-in" app data? I have replaced the normal, crap launcher with Holo Launcher and cannot seem to get correct permissions when the ROM is installed thru SS. I believe the issue is permissions for /data/data/ get screwed up or not set correctly. I have looked and looked and tried to determine the correct permissions, but still no joy. I've tried to fix /data/data permissions in the updater-script, but it seems like each subfolder/file has different permissions making me think I'll have to go thru them one-by-one.
I have a work-around in place using a OneTimeInit script that does work, but it seems like that's not really the best approach?
2) Kind of ties into question number 1, I patched the framework-res.apk in to allow WiFiHotspot, but without being able to install the system settings data properly, there is not a "Quick Shortcut". Again, I've resolved the problem using the OneTimeInit to update Sqlite DBs after the system is up.
3) How do I de-odex the stock ROM? Using Android Kitchen doesn't seem to do it right. It works mostly but I still seem to get various FCs. I tend to believe that some things just cannot (should not) be De-Odex'd?
I've also discontinued Zip-Aligning because it sometimes produces errors on my ROM. Is it not advised to use Android Kitchen to do these tasks or is there some trick to getting it to work just right?
Bonus Question) I was going to share my ROM on XDA but it says I'm not allowed to post in Development. I assume because of my low post count. Any way I can get an over-ride or should I just make a few more posts and then do it?
Thanks again guys!
I appreciate all the help as always!
Jake
Click to expand...
Click to collapse
1: All I had to do was place apk in /system/app or /system/priv-app and thats it. Make sure when you add your apks you dont unzip the archive. basically use kitchen and build your base rom then simply open the archive and make your edits. I also used the updater script from beans base build and only edited the ui print.. Messing with the updater script i wouldnt recommend as it could be causing some of your issues.
2: If using beans base theres no reason for you to edit anything as the hotspot is already baked in.. you must have borked it.. If you are not using beans base then maybe you should copy his files for the native hotspot as its already done properly. I wouldnt mess with framework or settings apks unless you know what your doing. Id work on gettin the fcs n other issues sorted first as you might b doin too much too fast.. work on learning how to make your apks work first before making edits to framework n settings apks.
3: The kitchen is best to deodex and zipalign.. also these two things should not cause fcs or errors if done properly. zipalign should help more than anything.. i just like workin with deodex bcuz its easier and only one set of files instead of .apk and .odex for just bout everything..
Again, if you are not using beans bases id recommend to do so.. his bases are already deodexed have hotspot zipaligned read/write to ext sd etc.. so you wouldnt have to do all from scratch and have so many issues..
Sent from my SM-G900V using XDA Premium HD app

elliwigy said:
1: All I had to do was place apk in /system/app or /system/priv-app and thats it. Make sure when you add your apks you dont unzip the archive. basically use kitchen and build your base rom then simply open the archive and make your edits. I also used the updater script from beans base build and only edited the ui print.. Messing with the updater script i wouldnt recommend as it could be causing some of your issues.
2: If using beans base theres no reason for you to edit anything as the hotspot is already baked in.. you must have borked it.. If you are not using beans base then maybe you should copy his files for the native hotspot as its already done properly. I wouldnt mess with framework or settings apks unless you know what your doing. Id work on gettin the fcs n other issues sorted first as you might b doin too much too fast.. work on learning how to make your apks work first before making edits to framework n settings apks.
3: The kitchen is best to deodex and zipalign.. also these two things should not cause fcs or errors if done properly. zipalign should help more than anything.. i just like workin with deodex bcuz its easier and only one set of files instead of .apk and .odex for just bout everything..
Again, if you are not using beans bases id recommend to do so.. his bases are already deodexed have hotspot zipaligned read/write to ext sd etc.. so you wouldnt have to do all from scratch and have so many issues..
Sent from my SM-G900V using XDA Premium HD app
Click to expand...
Click to collapse
Thank you for the response!
It seems perhaps I didn't quite make clear what I've done versus what I'm trying to accomplish.
Firstly, I wouldn't go so far as to say I'm "having so many issues". Everything in my ROM is in perfectly fine working order. I just have these few quirks that I would like to address both so I can learn, and to make this and future projects better.
While I appreciate the recommendation to use bean's base, I have taken a look at his and there seems to be nothing in his which copies data into /data/data/com.whatever.package (or at least there's nothing in his zip in the /data/data folder -- not sure if his ROM has the toggle activated?)
I have the Apps working correctly in my ROM -- they just go in /data/apps, /system/app or /system/priv-app, respectively.
What I need, is to get /data/data/com.whatever.package/ copied With Correct Permissions when the ROM is installed; I do not want a second zip to update things after install, especially for a toggle and a couple shortcuts, seems silly.
For instance, when you boot your phone up with the default [stock] samsung launcher, it has a list of default apps and widgets on the first screen you see such as phone, messages, a clock widget, etc, etc. Since I've replaced the stock launcher with Holo Launcher HD and some other default apps have also been replaced, there's very few shortcuts on the main launcher screen.
** Holo Launcher does have a list of default apps it adds to your main page, but many of those have been removed in my rom.
The solution I've come up with basically waits for the system to boot up to the point that Holo Launcher actually creates the default (mostly blank) /data/data/com.mobint.hololauncher.hd/databases/launcher.db and then my script uses sqlite3 to update the DBs with a list of different shortcuts -- ones to apps that actually exist.
The Hotspot Toggle is the same way as above.. Hotspot works fine in my rom if you go through settings!
I just cannot add the notification panel pull-down toggle to /data/data/com.android.providers.settings/database/settings.db until after the system boots up at least ONE time, and then update the DB to include WiFiHotspot in notification_panel_active_app_list and notification_panel_active_app_list_for_reset
As for the zipalign and deodexing, I will have to try those again now that I have a fairly stable rom.
****EDIT****
I think I figured it out. I can just use busybox to kill the systemui after I update the databases during the first boot. I also figured out how I can add the SetupWizard without it locking up on activation.
Thanks anyways, guys.
Look for my rom, coming soon!
=P

Please add support for more languages
I found a mod for Motorola latest 4.4 please port it
Sent from my SM-G900T using XDA Free mobile app

Related

[think tank] disable increasing ringer (link to intl ver working)

I saw this thread and it made me gain interest in this again. I know many do not like three ringtone volume increasing.
If this is possible on the international version, we should be able to do the same right?
http://forum.xda-developers.com/showthread.php?t=759537
This would be great i hate that volume increase in ringtones. Any dev plz port this for Vibrant.
The meat of it
The meat of what they are doing appears to be in >> THIS << post, which I will quote below. If any developer that knows what they are doing wants to attempt this for the Vibrant the quoted post should give them an quick idea of its feasibility. If it looks like it is doable there is more info in the original I9000 thread that is linked in the OP.
the_ozyrys said:
Hello,
I've just found a (not easy) way to disable increasing ring.
This involves using Apk Manager to backsmali Phone.apk,
which then have to be replaced by patched version, either by root access or creation of update.zip.
Procedure:
1. Get your Phone.apk (\system\app\Phone.apk) and copy it to computer.
2. Use Apk Manager to decompile it.
3. Open folder with Phone source (<Apk Manager folder>\projects\Phone.apk\smali\com\android\phone).
4. Open file Ringer$1.smali with your favourite text editor.
5. Find line that reads:
Code:
invoke-virtual {v1, v5, v4, v3}, Landroid/media/AudioManager;->setStreamVolume(III)V
6. Delete this line, save the file.
7. Compile Phone.apk, put it back to phone.
8. Enjoy constant-volume ringtones.
Side effects:
- currently not known
- if you have problem decompiling Phone.apk, >here< is the solution
Maybe somebody will make pre-patched packages, I'm currently using JM5
so I can only provide one for this firmware.
Click to expand...
Click to collapse
are you guys talking about when someone calls you and the ringtone is like quiet almost, and then goes super loud? if so, i want that too, its annoying as hell.
xriderx66 said:
are you guys talking about when someone calls you and the ringtone is like quiet almost, and then goes super loud? if so, i want that too, its annoying as hell.
Click to expand...
Click to collapse
Yes
4 5 6 7 8 9
I will work on this tomorrow after I get off work unless someone beats me to it. This ringer volume issue has been bothering me a lot with this phone.
That would be amazing man. It would have to be incorporated into every rom (as an option)!
This thread should be en dev section.
pretty sure that is where I posted this initially..... must have been a mod moving it.
OK so this fix rrequires that use the .apk's from a deodexed rom which I don't have on hand so I will down download a few and edit the .apk's. Gonna take a bit more time than previously thought but I will get it done soon.
YetisAreReal said:
OK so this fix rrequires that use the .apk's from a deodexed rom which I don't have on hand so I will down download a few and edit the .apk's. Gonna take a bit more time than previously thought but I will get it done soon.
Click to expand...
Click to collapse
Thank you for this. Please log your work. With a good writeup and good understanding of what is going on it would be nice to see devs put this in as a option on all the deodexed ROMs.
Some good news and some bad for now. I have successfully decompiled and recompile the APK as told but no luck so far in fixing the ringtone. Ran into a similar issue that the i9000 users were with each build being different. I am testing on JL4 first with other builds to follow once I am successful. In my Phone.apk I found two lines similar to the line mentioned in the OP for the i9000 but removing either one or both has has no effect for me so I am digging deeper and trying test builds. Java isn't exactly my thing so if anyone with java know how would like to look at the decompiled script I can forward it to them.
EDIT: added the file for peer review just remove the .txt and open with any text editor.
After reading this last night, seemed easy enough, I was determined to try this. Dl'd the apkmanager, extracted my phone.apk, and began playing. Apparently, this is listed in the About/Tips/Debug (menu selection 23) inside of apk manager, you cannot decompile themed apk's, which is exactly what i was trying to do with my Ginger Clone phone.apk. Oh well, back to the drawing board, or at least something with a stock phone.apk i can play around with. Anyone have one, unthemed, from froyo (preferrably jl4 as thats the basis for the current rom I'm running) they want to post?
Br1cK'd said:
After reading this last night, seemed easy enough, I was determined to try this. Dl'd the apkmanager, extracted my phone.apk, and began playing. Apparently, this is listed in the About/Tips/Debug (menu selection 23) inside of apk manager, you cannot decompile themed apk's, which is exactly what i was trying to do with my Ginger Clone phone.apk. Oh well, back to the drawing board, or at least something with a stock phone.apk i can play around with. Anyone have one, unthemed, from froyo (preferrably jl4 as thats the basis for the current rom I'm running) they want to post?
Click to expand...
Click to collapse
Here you go stock JL4 Phone.apk, please let me know if you get this working I had no luck.
YetisAreReal said:
Here you go stock JL4 Phone.apk, please let me know if you get this working I had no luck.
Click to expand...
Click to collapse
Thx! I'll be giving it a go in the morning when I get to my pc.
Ginger Clone's of the World Unite! Via the XDA App
Epic Fail. I successfully decompiled, edited, and recompiled the APK. The exact line in the script that was linked instructions from T313C0mun1s7 was removed, script file saved, apk recompiled properly, and pushed to the phone. Rebooted phone, the stock jl4 i just edited actually works and doesn't fc on Ginger Clone R2 Final, but the ascending ringtone is still there. I'll post the edited apk if anyone is interested, but it seems to not work. I see, more research in my near future.
Edited - spoke too soon, fc's on outbound calls. Gonna try again granted I have the time this morning, if not, I might have to wait until I get back in town after the holidays to play around with this.
Edit 2 - No more fc's on outbound calls with the newly edited phone.apk, but also, still having the ascending ringer. I removed both lines in the script that echoed the linked post on page 1, tried with removing one or the other first, then both, and still the ascending ringer persists through all attempts. Hrm.
I see you ran into the exact same problems I did using JL4 stock. I am on JL5 now so I am going to test a few things on this build now in the hopes I can fix this.
YetisAreReal said:
I see you ran into the exact same problems I did using JL4 stock. I am on JL5 now so I am going to test a few things on this build now in the hopes I can fix this.
Click to expand...
Click to collapse
First of all I have no idea what I am doing. Second I am not sure of all the issues you guys are having. I am just trying to think outside the box. I found this not sure if it applies or not.
apks can be re-edited a few different ways. The easiest example is by replacing the individual files within the apk by dragging and dropping the files in a program such as 7zip or winrar. In this manner the signature of the apk isnt broken. If you must unpack the apk file then when you pack it back up you must resign the app to have in install successfully. Do a google search for Stericson's apk sign application (its over on xda forums). I usually prefer the first way, but have also done the second method and it works as well.
yetis - yeah, same place you were getting stuck. let me know what your results are for the jl5 attempt. i tried with both the jl4 stock and ginger clone apk's this morning, all with the same results.
nomad - thx for the heads up, i am admittedly a novice in the android world, but have been in IT for years and am a self professed computer geek. With the apkmanager posted earlier in this thread, it will do all of the uncompiling and decompiling for you, as well as signing and a ton of other things written into the script, all based on user choices. it does warn about signing system apps after recompile, unless you want to resign all of the other system apps. Never had a problem with the installing of the modded phone.apk, just push it to the system/app folder and reboot, and the last one i did worked flawlessly without and fc's, but did not fix the problem of the ascending ringer.
Yetis, I was over reading through the thread on this in the i9000 forums, and I dug up some information that might help us here. I'm away from my pc so can't verify any of this right now.
-Make sure the rom is deodexed.
-Delete the line that matches what was posted earlier, I think it was the first one in that script, not the one way down at the bottom, leave that one be.
-When recompiling, set the compression in apk manager to 0 (not sure how to do that without the program in front of me)
When you go to push the file, put your phone in airplane mode first, push, then reboot.
Let me know if any of this helps, good luck.
Ginger Clone's of the World Unite! Via the XDA App

Soft key color change?

I'm curious if anyone has used Rom Toolbox, and knows if it can change the color of the three soft key colors (you know, back, home, task mgr)? Or do you know how to do this WITHOUT running a ROM. I'm not a big fan of ROMs. I know how to manually replace the boot animation, but figured if ROM Toolbox can do both of these, then I will use it. Either my search skills are very crappy (which I know to be fact, lol) or nobody has ever really posted about this. Any help would be appreciated. These are last two things I need to finish my customizing. Thanks.
EDIT: CRAP! Can a mod move this to the Q&A? That's where I was, and I somehow ended up in the General section, lol. Thanks.
Edit the systemui.apk file, in the res/drawable-hdpi folder all the icons are there.
Custom ROM not needed, just root since it's a system file.
Sent from my Nexus 7 using xda premium
More difficult than thought. I extracted SystemUI.apk from "system/app", replaced the default images with the ones I want to use, zipped it back up, renamed it from SystemUI.zip to SystemUI.apk, and then when I attempted to paste it back into system/app, it wouldn't let me since the folder is read only. I can't seem to change the permissions of "/system/app" so that I can paste this in there. I had a feeling this try wouldn't work, as I got the instructions from a Galaxy Nexus instruction which stated that it would really only work if a deodexed ROM was installed, but figured i'd give it a shot anyway.
I also tried using ROM ToolBox. Created my theme, but it says the theme is incompatible when I try to install it (followed the directions step by step for creating the theme). Looks like I may have to contact the developer of RTB since it would appear that the Nexus 7 isn't supported yet.
"We have compared the images and apps with your current system and have determined that this theme will not work for your current device setup."
Any other thoughts? Am I doing something wrong? Just don't really have a need for a full fledged ROM. Just wanna change 3 little software buttons, lol.
EDIT:
Forgot to mention that I also tried Zip Themer, but like RTB, it doesn't support Nexus 7 yet. I'll be sure to inform both developers
Use root explorer, put the modded apk on your SD then using the phone copy it from SD to /system/app with root explorer and click the mount r/w button at top , or use adb t push it to the device
Sent from my Nexus 7 using Tapatalk 2
If your rom is odexed (which the stock.rom is), then you will not be able.to achieve what you want...
You will need to deodex your rom before theme'ing
Sent from my HTC One X using xda premium

[Q] Own ROM issues?

Right.
So, when I open up .ext3 files in 7zip I notice they have "users" and "modes".
Things I'm curious of:
1. How can I remove apps in my ROM via .ext3 editing?
2. How can I install apps in my ROM (via .ext3 editing)?
3. Just simply removing the .apk for, let's say, the Phone app (BlurPhone.apk) and putting a different apk named Phone.apk, but with the same function and simply being a port from a different phone, will it be a issue?
4. GO Launcher EX/Go Locker - can it be installed in a ROM?...
Also, I got some issues regarding the MD5 Sum ("mismatched " but it actually is a duplicate ). Was it because I had a vanilla copy of my backup in the backup folder?..
Bump?...
Firtst if all, learn to make an cwm zip , its much easier to make changes that way.
To remove an app, just remove the apk file. Do the opposite when adding apps.
Any launcher can be added to rom.
Sent from my MB525 using xda app-developers app
This excellent instruction might help you with building from source:
http://forum.xda-developers.com/showthread.php?t=1593117
thanks, but sadly I'm not going to develop 4.0/4.1 stuff, only 2.3 skins for the moment. Thanks for the help tho
Another (kinda random, but hey): how's the lockscreen app named?...Or is it a sub-part of a motoblur app?

Tweak theme without computer

I don't spend lots of time at the computer, so I like to find ways to do as much as possible on the phone. One thing I've found is that every theme I try has at least one element I wish I could change, as much as I like it overall. I don't know enough to make my own theme, but I found a way to change elements of the theme without using a computer. I'm sure this is not news to many of you, but I figured there might be other non-experts like me out there who might appreciate it.
1. Download Apktool apk file below, install it, open it, {it will automatically update on the first use for some reason}, go to settings and check 'device has root', {leave other settings alone}, then close the app, reopen and grant su access.
2. Make a directory in storage somewhere called 'apktool', {or something}, and copy the following to it: /system/framework/framework-res.apk, /system/framework/SemcGenericUxpRes/SemcGenericUxpRes.apk, and whatever themes you want to mix and match.
3. Open apktool app, navigate to apktool directory, and import the framework files by tapping on each one and selecting 'import as framework'. When done, you can then tap on the theme apk files and select 'decompile all', and they will be decompiled into folders called {appname}-src. Go into the folders with a root explorer and change what you want, then go back to apktool, and tap on the folder you want and choose 'recompile'. When recompile is done you end up with an apk called '{appname}-src.apk'. Tap on that and choose 'sign'. When done you will get an apk called '{appname}-src-sign.apk, which you can install normally.
-Notes, questions-
- I'm currently using Z1c stock .236 deodexed rom. This app should work on other phones, roms, versions, etc, but I can't say for sure. What I know is that there are at least 5 versions of the app out there, {Google search for 'apktool 4.4' or '5.2', etc}, and it seems like each one works better on certain versions of Android. There are also configurable settings. If you have a different phone or rom, etc, you just have to mess around with it.
- This app should work as normal apktool for modding systemUI and framework, but I can't get it to recompile on LP, but only on Kk. Decompile works fine, but on recompile it complains about lacking resources. I don't know what file it wants. If someone can figure it out that would be great.
-If you don't know what files to change, all I can say is that I didn't either. Start with the obvious stuff, like navbar keys, and see how brave you get. Just make sure your file names are changed, since every app doesn't use the same names for the same files. As long as you work with copied files you have nothing to lose. If something is wrong with your modifications, then it won't recompile correctly, and you'll just get an error message, so you can't really install something that's going to mess up your phone.
- This also works for changing appearance of other apps, not just themes. See my recent posts in the Naked Browser thread for examples. However, sometimes it won't be able to decompile an app, and there's probably nothing you can do. I think the way apktool works is based on how the app was created. If something is not compatible, it just won't work.
- You don't have to decompile just to pull files out of an apk, but you do need an app that can do it. I use Rom Toolbox Pro. There may be free ones, {maybe Mixplorer}. I think you can just change the extension to zip and extract normally. However, some files and folders are not the same zipped in the apk as they are when decompiled.
File link - https://drive.google.com/file/d/0B5E7sFT1phjoS003R0tkM21qUlk/view?usp=docslist_api
Nice tutorial bro :good:
Thank you very much!
Sent from my D5503 using XDA Free mobile app
Since sharing themes with others' work is not kosher, (http://forum.xda-developers.com/crossdevice-dev/sony/share-frankentheme-t3282360), I figured I'd add a little more here for anyone's personal use. In general, here's what I've found with these themes:
- Within each apk there is an 'assets' folder, which contains zip files. Each zip file mods a certain aspect of the ui. For example, there will be one for settings, which contains the little pictures next to each settings option, (personalization, with the little rainbow, etc). You can experiment with simply swapping these around with different themes. However, if you want to add a settings zip, for example, to a theme base that does not already have a settings zip in it, you have to mod the main android manifest file in the top level of the apk. If you want to see how it needs to be modded, look at one that has it already. It's pretty obvious, since it's the same entry for each zip, but with the corresponding zip name. You can also extract these zips and replace files in them and rezip. Keep in mind, though, that there are some things that aren't that simple and just won't work.
- There are some things that are coded in, and can't be changed, (as far as I can figure out), like accent color. It seems like accent color just comes with the 'android' zip, and there's nothing you can do about it. As a workaround, you can find an 'android' zip with a color you like, and change out the other files from the zip you wish you could change the accent on. Again, sometimes it just won't work and you won't know why.
- Some themes don't follow this pattern at all. I haven't learned much about them yet.
Screenshots show examples I've used...

Can't Modify SecContacts_M_OSup_Note_Legacy_USA.apk

Background: Really not loving the default New Contact icons and the random colors. Should be easy enough to change. What I tried (and failed miserably...)
MODest ROM 11 (Twiz/stock 6.01-based)
Flashpoint 5 Kernel
Copied SecContacts_M_OSup_Note_Legacy_USA.apk from
/system/priv-app/SecContacts_M_OSup_Note_Legacy_USA/
to my Win7 PC.
Used 7-Zip to unpack the file to a temporary folder.
Found the .qmg files I didn't like.
Found a .qmg that would be a passable replacement for the ones I didn't dig.
Made 11 copies of that image in a working folder.
Renamed each copy to the exact name of each of the 11 files I wanted to replace.
Dragged those 11 files back into the open .apk in 7-Zip
On the Phone, in Root Explorer:
Made a copy of SecContacts_M_OSup_Note_Legacy_USA.apk in the same folder:
/system/priv-app/SecContacts_M_OSup_Note_Legacy_USA/
deleted the original
Copied my mod'd apk back into this folder and set the perms.
Rebooted.
No Phone or Contacts on home screen or in Apps
Tried to 'install' the apk from Root Explorer.
Wouldn't install
Tried to delete cache & Dalvik from TWRP.
No Joy.
Tried to do a partial Nandroid restore of Contacts and sec.phone from Titanium (nothing there called /systempriv-app/SecContacts_M_OSup_Note_Legacy_USA)
No Joy.
Nandroid restore from TWRP.
Back to normal.
Okay, what did I do wrong, and how can I change the icons?
Should I have used APKTook instead of 7-Zip, created a new signature, etc?
Should my mod'd apk somehow be flashed from recovery rather than copied to a system folder?
Is this some perverted Samsung-ism that would have worked fine on any other phone on the planet?
Thanks for reading.
ForestCat said:
Background: Really not loving the default New Contact icons and the random colors. Should be easy enough to change. What I tried (and failed miserably...)
MODest ROM 11 (Twiz/stock 6.01-based)
Flashpoint 5 Kernel
Copied SecContacts_M_OSup_Note_Legacy_USA.apk from
/system/priv-app/SecContacts_M_OSup_Note_Legacy_USA/
to my Win7 PC.
Used 7-Zip to unpack the file to a temporary folder.
Found the .qmg files I didn't like.
Found a .qmg that would be a passable replacement for the ones I didn't dig.
Made 11 copies of that image in a working folder.
Renamed each copy to the exact name of each of the 11 files I wanted to replace.
Dragged those 11 files back into the open .apk in 7-Zip
On the Phone, in Root Explorer:
Made a copy of SecContacts_M_OSup_Note_Legacy_USA.apk in the same folder:
/system/priv-app/SecContacts_M_OSup_Note_Legacy_USA/
deleted the original
Copied my mod'd apk back into this folder and set the perms.
Rebooted.
No Phone or Contacts on home screen or in Apps
Tried to 'install' the apk from Root Explorer.
Wouldn't install
Tried to delete cache & Dalvik from TWRP.
No Joy.
Tried to do a partial Nandroid restore of Contacts and sec.phone from Titanium (nothing there called /systempriv-app/SecContacts_M_OSup_Note_Legacy_USA)
No Joy.
Nandroid restore from TWRP.
Back to normal.
Okay, what did I do wrong, and how can I change the icons?
Should I have used APKTook instead of 7-Zip, created a new signature, etc?
Should my mod'd apk somehow be flashed from recovery rather than copied to a system folder?
Is this some perverted Samsung-ism that would have worked fine on any other phone on the planet?
Thanks for reading.
Click to expand...
Click to collapse
That apk took me a long time to figure out too. It's one of the apps you I had to modify for multi dpi. The only way I know of is to change the compression when you're putting the app back together and even then it took a couple tries. There's probably a better way but the compression change seems to work well enough.
I don't know if 7-zip has this option, but with winrar you can change the compression to "store". You should know right away whether or not it worked. You'll see the little phone icon in the bottom left of the lock screen. You may still have to do a factory reset to see your changes (probably not though) but the app should work without it.
By the way, you can swap those image files for .png files if you'd like. Just delete the corresponding .qmg or .pio file.
I saw your post in the rom thread about theming TouchWiz. You should check out @supergrobi94's theming threads. He's put together an impressive collection of options for 6.0.1 and 5.1.1 and there's also a [how to] section that uses the vrtheme zip that will modify the res folder of a specific app without having to break it down. I'm not sure how active he is these days but he's always been very helpful with requests and questions in the past if you need it.
Supergrobi94's theming threads:
This one has all the themes
This is the [how to] thread
kevintm78 said:
That apk took me a long time to figure out too. It's one of the apps you I had to modify for multi dpi. The only way I know of is to change the compression when you're putting the app back together and even then it took a couple tries. There's probably a better way but the compression change seems to work well enough.
Click to expand...
Click to collapse
Ah, that makes perfect sense. But I'd never have figured it out myself, lol.
I'll dig into those theming threads, thanks.
kevintm78 said:
☆☆Edge Panel for ModestRom v11☆☆
DOWNLOAD-This will change your Contacts app to the S6 version and the IncallUI app to the Note 7 version because the people stripe will not work with the N4 contacts.
Click to expand...
Click to collapse
OK, this is from the MODest ROM thread, but I think it's germain here.
SO.....
If I want to 'try out' that Edge Panel, is there a way to revert back to the stock apps in question other than restoring a nandroid backup or re-flashing the ROM?
I ask because I'm thinking that, at least in the case of the Note 4 and its well known memory problems, 'bulk' memory writes like ROMs, nandroid retores, etc., stress the device, so I'm trying not to do it more than I have to.
During my last episode(see above) putting the stock apk back in its original folder didn't work.
Is there a standard procedure for either android generically, or touchwiz specifically, for safely reverting back to the stock system apps after experimenting w/ custom stuff?
EDIT: Just tried something. In Root Explorer, went into:
/system/priv-app/SecContacts_M_OSup_Note_Legacy_USA/
and simply renamed the .apk to .foo
Rebooted.
No Contacts, as expected, but no Phone either??? Not sure why.
Anyway, back into Root Explorer.
Rename .foo back to .apk
Reboot.
Still no Contacts or Phone, so something bigger at work here.
Before I have to restore Nandroid anyway (unless there's a better way???),
I flashed your EdgePanel.zip in TWRP to see if it would restore the Phone/Contacts apps.
Wiped the cache. Reboot.
Edge Panel is now there, but still no Phone or Contacts. WTF???
Last resort-TWRP- Factory Reset.
Now the Contacts/Phone are back (and all my other stuff is gone, lol)
So is whacking the Data a necessity here?
If so, it makes trying out things related to the phone/contacts a LOT more tedious...
Any workaround???
Thanks again.
ForestCat said:
OK, this is from the MODest ROM thread, but I think it's germain here.
SO.....
If I want to 'try out' that Edge Panel, is there a way to revert back to the stock apps in question other than restoring a nandroid backup or re-flashing the ROM?
I ask because I'm thinking that, at least in the case of the Note 4 and its well known memory problems, 'bulk' memory writes like ROMs, nandroid retores, etc., stress the device, so I'm trying not to do it more than I have to.
Click to expand...
Click to collapse
No, it doesn't look like I ever made an easy way to go back. I had thought I did but I'm either overlooking it or it's not there. Feel free to rifle through my androidfilehost folders if you want to double check. All of my stuff is very organized so it could be buried in there somewhere.
If you still need a recovery zip let me know and I'll get one together. I'm actually going to make one anyway but if you need it right away I can get on it. I didn't realize that there wasn't a way back to stock.
ForestCat said:
During my last episode(see above) putting the stock apk back in its original folder didn't work.
Is there a standard procedure for either android generically, or touchwiz specifically, for safely reverting back to the stock system apps after experimenting w/ custom stuff?
EDIT: Just tried something. In Root Explorer, went into:
/system/priv-app/SecContacts_M_OSup_Note_Legacy_USA/
and simply renamed the .apk to .foo
Rebooted.
No Contacts, as expected, but no Phone either??? Not sure why.
Anyway, back into Root Explorer.
Rename .foo back to .apk
Reboot.
Still no Contacts or Phone, so something bigger at work here.
Before I have to restore Nandroid anyway (unless there's a better way???),
I flashed your EdgePanel.zip in TWRP to see if it would restore the Phone/Contacts apps.
Wiped the cache. Reboot.
Edge Panel is now there, but still no Phone or Contacts. WTF???
Last resort-TWRP- Factory Reset.
Now the Contacts/Phone are back (and all my other stuff is gone, lol)
So is whacking the Data a necessity here?
If so, it makes trying out things related to the phone/contacts a LOT more tedious...
Any workaround???
Thanks again.
Click to expand...
Click to collapse
That is strange that they are not coming back. You may just want to double check your permissions and that there isn't two of the same apps in your folder. At the time of making that Edge zip I was still using other programs to make zips for me and the major downside to that is having to name the new apps the exact same as the old so it would get overwritten so if it doesn't match you'll end up with two active apps in one folder.
Now I think the best way to do that is to use a binary script (osm0sis has great tutorials for this) to change the app getting replaced to a .bak file and then just copy the new app to the system, set perms, and reboot (dalvik cache/ cache needs to be wiped if it's a framework .jar file). But to each their own. If you can get the job done a better way then I would use what you're comfortable with.
My system to test apps isn't much difference than yours. I think the only thing I do differently is change the app to be replaced to .bak instead of .foo although I can't imagine there's much difference. There's been a few apps like the Contacts app that gave me a bunch of trouble when modifying them but I can't remember ever having trouble bringing back the stock app. I wish I had more insight on that situation for you. If push comes to shove I would reflash the rom zip over factory reset only because the factory reset won't correct the system partition problem, if that's what's going on in this case.
kevintm78 said:
If you still need a recovery zip let me know and I'll get one together..
Click to expand...
Click to collapse
First, Merry Christmas!
Thanks very much. No rush on that, I'm OK on the Edge version for the minute.
What would be extremely useful if you have some time/curiousity would be to replicate my steps, ie renaming the untouched apk in a fresh MODest flash (i.e. break the contacts/phone function), and then see if you can get the whole thing working again without a factory reset, or if not, why. I see on xda, you & I are not the first ones to be tripping over this contacts.apk issue.
The other thing that would be telling is after successfully installing the Edge.zip, whether you can modify something (like a picture) within the contacts apk within the zip, reflash the zip and have contacts/phone still working with the change active.
I think there just HAS to be abetter way than Factory Resets.
Thanks so much again for the insights. I really want to become at least minimally competent at hacking my own ROMs together so I don't have to feel like such a noob/mooch on here, but I really do appreciate the help.
What are your weapons/platform of choice, or, if there are better tools for noobs learning the ropes, I'm all ears.
EDIT: Just found this. The last post is interesting...
https://forum.xda-developers.com/galaxy-s5/devs-only/recompile-seccontacts-apk-t3377142/page2
ForestCat said:
First, Merry Christmas!
Thanks very much. No rush on that, I'm OK on the Edge version for the minute.
What would be extremely useful if you have some time/curiousity would be to replicate my steps, ie renaming the untouched apk in a fresh MODest flash (i.e. break the contacts/phone function), and then see if you can get the whole thing working again without a factory reset, or if not, why. I see on xda, you & I are not the first ones to be tripping over this contacts.apk issue.
The other thing that would be telling is after successfully installing the Edge.zip, whether you can modify something (like a picture) within the contacts apk within the zip, reflash the zip and have contacts/phone still working with the change active.
I think there just HAS to be abetter way than Factory Resets.
Thanks so much again for the insights. I really want to become at least minimally competent at hacking my own ROMs together so I don't have to feel like such a noob/mooch on here, but I really do appreciate the help.
What are your weapons/platform of choice, or, if there are better tools for noobs learning the ropes, I'm all ears.
EDIT: Just found this. The last post is interesting...
https://forum.xda-developers.com/galaxy-s5/devs-only/recompile-seccontacts-apk-t3377142/page2
Click to expand...
Click to collapse
I'm not exactly sure what's going on with your contacts app not showing back up. Ever since modestrom v8 (I think) I've been doing the multi dpi on SecContacts_M_OSup_Note_Legacy_USA and every time I would test it doing the same as your way. After a reboot if the modified app was no good, then I would just delete that new app and change the name of the old app back to .apk, reboot and it would work again. I can't remember running in to any problems where I would have to factory reset or reflash the rom to get things working again.
There has been a couple times where I've had to factory reset to get a color change to show up or if you're adding toggles to the QS drop down that also (sometimes) requires a factory reset to show up.
As far as the post you linked, that is exactly how I do it except I use winrar to open the newly compiled app and drag the changes to the original. When I drag the changes over I change the compression method from "normal" to "store". If I don't change the compression the app doesn't work for me. The apps that I've ran into where I had to change the compression are: secContacts, secCamera, secSettings, and framework-res.apk. Any other app that I've worked on can be dragged and dropped without compression changes.
Jar files don't need an original signature though (so long as signature verification has been disabled, which it has in modestrom). They can be decompiled, edited, recompiled, and copied to the system. It does require a dalvik cache/cache wipe though on all framework files except for the framework-res.apk and twframework-res.apk
If you get a chance, you should start using apktool to decompile/recompile. It will make things easier for you in the long run and most of the time if you've made any mistakes in your edits apktool will catch it. If you're not familiar with apktool you can try using Tickle My Android or Advanced Apktool. You may also want to get Apktool by itself. I use all three of them. Android can be fickle and sometimes what works with one app won't work with another. What's nice about TMA and Advanced Apktool is that they'll do the drag and drop method for you, but when the compression needs to be changed that's when I use apktool by itself.
Sorry for the word vomit. Hopefully, this all makes sense.

Categories

Resources