[Q] How to enable mass storage in CM 10.1 ? - LG Optimus 4X HD

Does anyone know how to enable USB Mass Storage on our phones under CM10.1? I've searched around and found this thread. But since I'm not familiar with changing build.prop I don't dare to do it myself. There are some CWM .zip files around to enable it, but they are on other phone's forums and I'm sure they just replace/change the build.prop so it's definitely not a good idea to flash those on a different phone than the ones they were intended for....
Long story short, does anyone know how to enable it on ours?
TIA!

Update on the process:
I was able to edit the build.prop according to the instructions, but that alone doesn't seem to do anything.
So I decided to try the next step, but where it tells me to do the changes below I wasn't sure what to do.
Thom75 said:
in framework-res.apk/res/xml/storage_list.xml
where oryginal line look like this:
Code:
<storage android:mountPoint="/storage/sdcard0" android:storageDescription="@string/storage_sd_card" android:primary="true" android:removable="true" android:maxFileSize="4096" />
after change look like this:
Code:
<storage android:mountPoint="/storage/sdcard0" android:storageDescription="@string/storage_sd_card" android:primary="true" android:removable="true" android:allowMassStorage="true" android:maxFileSize="4096" />
Click to expand...
Click to collapse
I was able to find the framework-res.apk file, copied to my computer and tried to open it with an XML editor... looked too complicated so I left it alone.
Does anyone know how to mess with that?

Open the .apk file with WinRar
-Drag the file you want to edit on your computer
-Edit the file on your computer
-Delete the old file in Winrar from the apk file
-Put the new file from your computer back in Winrar and save the "new" apk file
-Put the new .apk file on your smartphone
Before you install the new .apk file take a Root Explorer and look at the permissions of the old .apk file and set this permission on the new once...
I hope i could help you

Sivvis said:
Open the .apk file with WinRar
-Drag the file you want to edit on your computer
-Edit the file on your computer
-Delete the old file in Winrar from the apk file
-Put the new file from your computer back in Winrar and save the "new" apk file
-Put the new .apk file on your smartphone
Before you install the new .apk file take a Root Explorer and look at the permissions of the old .apk file and set this permission on the new once...
I hope i could help you
Click to expand...
Click to collapse
Thank you very much for your help! I didn't know apk files were just a compressed library of other files.
Now I am stuck trying to edit the "storage_list.xml" file... I tried to open with a few different xml editors, but could not get clean text like the example before. Any sugestions?
I attached the file below:

Apoena said:
Now I am stuck trying to edit the "storage_list.xml" file... I tried to open with a few different xml editors, but could not get clean text like the example before. Any sugestions?
Click to expand...
Click to collapse
Well, how about decompiling the .apk file with APK Tools instead of just opening it with WinRar? :laugh:
Yes, now I get a clean, editable, decompiled xml file.
I'll try editing both when I get home tonight and will post the results.

I guess this is a problem because of the emulated layout. There is a trick with setprop sys.usb.storage.config mass_storage but it does not work.
Keep me informed if you find something valuable (i'm on original CM10.1, latest nightly 0423 actualy).

Ok, here's the update from last night:
I started over since I flashed the nightly, which is good so I restarted with a clean slate.
- Edited build.prop - OK
- Copied framework-res.apk to my computer
- Decompiled framework-res.apk
- Edited storage_list.xml
- Recompiled framework-res.apk with new storage_list.xml
- Copied framework-res.apk back to my phone
- Deleted original framework-res.apk
- ...... instant restart & bootloop before I could paste the new framework-res.apk in its place
No big deal, just restored a nandroid backup I made before messing with anything and I'm back in business.
Apparently you can't mess with the framework-res.apk while your phone is on (with the OS running)... so now I need to research the right way to push/pull these files from ADB while on CWM recovery. I appreciate if someone could point me in the right direction since I'll be busy at work today.
To be honest, my gut feeling tells me that this is not going to work anyway. But look at what I learned so far... two days ago I wouldn't even think of compiling/decompiling anything... this is what XDA is all about, right?

Imho, the framework_res.apk and various tricks are all enabling or disabling a sys.usb.storage.config key. I'm not understanding nor finding informations about CM10.1 emulated layout, and if there are any reasons to forbid mass storage (because, yes, it seems it is disabled because it is not compatible).
This is something i have hard time with. On Android, you have tons of improvement for rom or kernel XY, but generally undocumented. If you apply this 'per device', the information is very fragmented and difficult to grab.
I was looking for a simple brief on base MTD partitions layout for LG P880, it seems the only way to have this is to dig KDZ files. Perhaps a Wiki would help the wannabe contributers like me to start ?

Any Solution For This Problem ??? I Can't Transfer Any Files To My O4X , What's The Point Of Cyanogenmod Then ??????????????

Nooby305 said:
Any Solution For This Problem ??? I Can't Transfer Any Files To My O4X , What's The Point Of Cyanogenmod Then ??????????????
Click to expand...
Click to collapse
Flash the latest nightly. MTP is working and you cab transfer files that way.
Sent from my tree using a ladder

effectively, if you are flashing for USM, you should stay on LG stock.

I know that the topic got a little old but I'd like to refresh it since more people (e.g. Ubuntu users) could be interested in enabling Mass Storage.
What I've done is:
1) pulled /system/framework/framework-res.apk
2) decompiled it with APKtool
3) added
Code:
android:allowMassStorage="true"
in storage_list.xml
4) builded a new apk
then I've rebooted my phone into recovery and (@Apoena you may be interested in it - there is a possibility to access /system through adb connected with phone in recovery mode) pushed the new framework-res.apk. I've also changed the entry in build.prop to
Code:
persist.sys.usb.config=mass_storage,adb
Everything seemed fine until I've tried to reboot the phone: instead of CM boot logo I got a black screen. Anybody has an idea what went wrong (maybe something during recompilation of the apk)?
And of course sorry for any language mistakes, I'm not a native speaker

Related

Tux App bar

Ok, maybe I'm going a little overboard here, but I jailbroke the phone just yesterday. I thought that it was time to see what all I would be able to do with it. So i got to looking around trying to figure out what I could skin. /system/app/Launcher.apk provided what i needed to redo the app bar. Here are my results.
I didn't do any modification to the xml files yet. I would like to get where I can edit the images out of those files as well. I removed the up/down arrows, but it was more of a replace with a 1x1px png. you get errors if the files are not put back with the right names or if files are missing. So I'm sure in the xml you would be able to edit it out.
One last thing. There really isn't much space on the /system mount. even when coping the file back up after repacking, I would ofter get not enough space on disk error. Trying again resulted in a success.
How about something else. I am not the best artist or graphics person. I'm sure that my files are larger then they should be. I had to do a 255 index on the color to get the image files down small enough. I'm sure with proper programming on my part, I wouldn't need the bar image, just the tux image. /shrug. I'm tired and going to be.
Enjoy.
Impressive. What does it look like with the apps menu expanded?
Oh, and how do you take screenshots?
It looks like it would noramally but with a tux on it instead of the grey bar. I will have to gt another image up.
The program to take screen shots is ddms (i think). It is in the tools directory of the sdk. Sorry, I just woke up for work.. not much sleep. But I do know if you are running linux it has to be on a 32bit os. It wouldn't run on my 64bit ubuntu.
a question I received
kron2 said:
can you help me i am new to linux and would like to edit some off the images in the app folder on the G1 my phone is jailbroke and i have the files to resign the apk's but don't no how to use them i no how to remove the files from the phone and edit them with rar. and thin i put the files back and rename the file apk but don't no how to resign it i have the emulator and ddms plus eclipse working i would think i resign it after i edit it but don't no where to put the files or how to use signapk.jar thx for your help
Click to expand...
Click to collapse
I don't know how much help I can be with the jar tool. I can tell you what I did though.
I used adb to get the /system/app/Launcher.apk file. The I extracted the file. So now I have the .apk file and a folder with all of the files in it. I then copied the .apk file to make a backup of it, just in case I needed to push it to the device.
Ok now I am set to do the editing of the files. I use Linux so I started gimp up editing an image. Then saved the image, keeping it the same size (56x295 - something like that) as the previous file. The files size (k/mb) will change. You need to keep this as small as you can.
I then started up Archive Manager, I think that you said that you use winrar or something. You might want to try 7zip, not sure though. Onward. I opened the .apk with the archive manager. The allowed me not to have repack the archive. I then dragged and dropped the edited .png file into the same folder I edited it from, into the same folder browsing though the archive manager. This did nothing more than update the .apk archive with the edited file.
then I pushed the file back to the droid. I hit the end button to turn the screen off and then menu x2 to get into the interface again. This refreshed the interface. and my edits were there.
That is about it. I'm going to copy and paste this reply in the forum so others will benefit from your question.

[GUIDE] How to make mymode themes

Well I haven't had much time lately to make themes but I figured i got enough time to explain how. This is how i do it in windows 7.
1) First thing i assume that you already have androidsdk on the root of your C drive. Lets go ahead and add it to your system path. If it's not called androidsdk go ahead and change it to that. Now open up your startmenu, right click computer, click properties, then click advanced system settings, in the advance system settings select environment variables. In the second box down look for path select it and choose edit. copy and paste this
Code:
;C:\androidsdk\tools
in there. Click okay.
2) download the jre and jdk from here and install them. Now you need to add them to your system path so copy paste this
Code:
;C:\Program Files (x86)\Java\jre6\bin;C:\Program Files (x86)\Java\jdk1.6.0_20\bin
to your system path just like you did in the first step.
3) Download apk manager from here. Now run it and when it says clean out all current projects click yes. Now thats ready to go.
4) Download an image editing program. I use gimp. Also if you don't have it 7-zip
your all set to go now so lets start over with the numbers
1) choose a mymode apk and extract it with 7-zip. Open up the res folder select a png that you want to change and change it with the image editor you chose.
2) when you've changed the images you want open up the original apk as an archive with 7zip. Then place the res folder of the modified unzipped apk into the archive and close the archive.
3) Now open up apk manager and place the mymode apk into the place here for signing folder click script batch choose no then type 15.
4) Now put the newly signed apk into your androidsdk/tools folder and close apk manager.
5) open command prompt and type this
Code:
cd\
cd androidsdk/tools
adb install whatever.apk
I'll update this with pics a more thorough guide.
Thanks to everyone that made this easy
reserved for themes to come
Thanks been waiting for a thread like this.
thanks, if i ever get any free-time between jobs and kid and fiancee i will look into this a little more
This is an awesome guide! I messed around with theming mytouch/g1 back when I had one.. so this will be great to make some themes for the slide..
One question though.. let's say you pull the nest theme.. theme it and re install it.. will it just override the nest theme or in the theme listing will it appear as a new theme and still allow you to have the original theme?
Sent from my T-Mobile myTouch 3G Slide using XDA App
ryanolson7 said:
One question though.. let's say you pull the nest theme.. theme it and re install it.. will it just override the nest theme or in the theme listing will it appear as a new theme and still allow you to have the original theme?
Sent from my T-Mobile myTouch 3G Slide using XDA App
Click to expand...
Click to collapse
The nest theme is in the framework, its not an .apk like the rest, its built into the system. The rest of the mymodes themes are .apks and if you edit those they will override the stock "nest" theme. The only way it will show up different in the theme chooser is if you edit the preview snapshot to be a preview of your theme. If you wanna keep the original theme, the nest theme is it and you should edit a different theme .apk...
-BMFC
Sent from my ROOTED MyTouch3G Slide
Okay so I got the next three days off and I already got two mymode themes pretty much done well their done but I just learned of a way to change the name so they are there own standalone apk instead of using another apk name. I've been using puppypride (which by the way isn't puppies those are full grown dogs) and switching out the pngs and you couldn't have the regular puppypride now you can have both
hope you don't mind but I did a mod of your themes and took out the bubbles since some people always create threads about it
Help with following guide
I am a newb at this so please don't attack me if I am doing something wrong. I have been struggling with following the guide posted to make mymode themes. I have successfully got up to the step of signing the apk file. I modified the files in the free_kick.apk. When I try to use APK Manager 4.8 and using the directions given the file just gets erased and nothing happens. My log file just shows errors. Any help with a more detailed directions one what to do in APK manager as I am trying different things and not getting anywhere. I use the option 15 like told in the guide. I can send my modified apk file to anyone if they can get this to work and get it installed that would be appreciated so much. I hope I can figure this out my own but thought I would try get help from the forums. Thanks in advance.
impimms said:
I am a newb at this so please don't attack me if I am doing something wrong. I have been struggling with following the guide posted to make mymode themes. I have successfully got up to the step of signing the apk file. I modified the files in the free_kick.apk. When I try to use APK Manager 4.8 and using the directions given the file just gets erased and nothing happens. My log file just shows errors. Any help with a more detailed directions one what to do in APK manager as I am trying different things and not getting anywhere. I use the option 15 like told in the guide. I can send my modified apk file to anyone if they can get this to work and get it installed that would be appreciated so much. I hope I can figure this out my own but thought I would try get help from the forums. Thanks in advance.
Click to expand...
Click to collapse
Actually the guide needs to be fixed a little because i'm guessing your getting compiling errors when using apk manager? But the best way to do this is to open up the mymode theme (using 7zip) as an archive delete meta-inf folder then replace the pngs with ones of your choice as long as they are the same scale. Then resign. and install
totally lost
I've followed these directions to a T and when it comes to using the apk manager i am getting nothing, please help
You guys that are having trouble with apk manager...its honestly not necessary to use Apk Manager for this. Mymodes themes are system .apks and shouldn't be re-signed. What you need to do is forget about apk manager (for now) and drop the UNsigned .apk into the ROM update you are using, and resign the whole ROM using the autosign tool created by jesusfreke. Or just adbpush the .apk. but don't resign the .apk.
Here's the link for the autosign tool to sign ROM updates. its in the THIRD POST and its auto-sign .zip, NOT the signing.zip in the first post. you can put it anywhere you want and you just drop (a copy of) your ROM update in the autosign folder, rename it update.zip, then run the sign.bat to sign. it will create another file, update-signed.zip. you shouldnt need to wipe when flashing the same ROM over itself, but i cant guarantee this is true for all ROMs.
you can also make an update that will only flash the .apk to /system/app, and nothing else will be changed. basically just make a copy of the update for the ROM youre using, then delete everything but the /system directory from the zip. then go into that /system directory and delete everything but the /app directory, then go into it and delete all the .apks and odex file or whatevers in there. ALL OF IT. when you are finished you should have an update with nothing in it but a /system/app directory. you put your modded .apk in there in /system/app, and thats it for that.
then you must edit the update script and remove MOST of its contents so that it only does what you want it to. THIS IS IMPORTANT! Go here to learn how to create an update script. what youll need is way simpler than the examples, youll want it to look basically like this...
Code:
assert compatible_with("0.2") == "true"
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
this update script will copy ANYTHING in the /system directory to /system on your device, regardless of subdirectories. that means anything in /system will go in /system, anything in /system/app will go to /system/app, etc. but since you only have one .apk in there it wont mess with anything but what you put in there. this way, you have a NOWIPE update for...well, whatever you want to put in it.
so you just drop the new shortened update-script in /META-INF/com/google/android/
and then use the autosign tool to resign your new update then flash away! This also takes less time cus its only flashing one file instead of flashing a whole ROM just to replace that one file...
hope this helps...
-BMFC
Sent from my T-Mobile myTouch 3G Slide using XDA App
So you cannot do this on t-mobile's rom which is 2.1 right now? I'm leery of rooting in case they ever release froyo
Tbrewer80 said:
So you cannot do this on t-mobile's rom which is 2.1 right now? I'm leery of rooting in case they ever release froyo
Click to expand...
Click to collapse
I'm having issues with this as well... After I do the whole signing apk thing, it installs fine, but when I go to MyModes, the preview is black and when I select it, the MyModes app force closes. I don't get it.

[Guide] Simple guide to theming ANY ROM

A lot of people have asked in various threads lately about getting this theme on x rom, or can someone port this theme for me, etc. It really isn't that hard. It actually is pretty much a simple matter of copying and pasting. This will work on any ROM, and it only takes a few minutes, easy enough for an amateur to do it.
1. First, download the ROM that has the theme that you want on your current ROM.
2. Extract framework-res.apk from /system/framework and rename it to framework-res-old.zip and then right click it, and click extract all. Just extract them to currentdirectory\framework-res-old, which should be the default option anyway.
3. Take your current ROM, and extract framework-res.apk from /system/framework, and repeat step 2 except name it framework-res-new.zip.
4. Browse to the framework-res-old\res folder and select all of the folders starting with "drawable", such as "drawable-mdpi"
5. Browse to the framework-res-new\res folder and paste those folders, it should prompt you to merge and replace files and all that jazz, just click yes and do for the next x conflicts. It will copy and replace all of the image files.
6. Go back to the root of your framework-res-new folder, highlight all of the contents, right click, Send to > Compressed (zipped) archive
7. Windows will re-zip framework-res-new. When it finishes, rename the new zip file to framework-res.apk and push it to /system/framework. If you haven't gotten s-off on your phone, you have to do this while in clockwork recovery (make sure you mount /system in the partitions menu, or if you are s-off and booted, type adb shell mount -o rw,remount /system if it gives you memory errors)
For other operating systems, the steps are similar. If you use a linux distro, I'm going to assume you are smart enough to figure out the compression tools and menu items to unzip and rezip the apk files.
NOTE: You don't actually have to change the extensions to .zip, in fact, you won't be able to unless you unchecked hide known file extensions in the windows folder options in control panel. I just thought it would be easier. If you don't want to unhide extensions, just use a tool like 7-zip or winrar to open and extract the APK. In simple terms, all you are doing is replacing the res folder of your new framework-res.apk with the one from the theme you want. Not very hard.
ANOTHER Note: Sense roms are a bit more difficult to theme, since all of the HTC apps are themed from images in com.htc.resources.apk in /system/framework. But if you are on a sense ROM, you probably can just use a MyModes theme. If you do however choose to try this on a sense ROM, it will only theme user and non-HTC apps. This guide will technically work for any ROM but it works best for AOSP based ROMs, like CyanogenMod or ArayrayMod. The only thing is that if there is a change in the color of text, then you have to decompile both framework-res APKs and copy styles.xml from the old one to your new one and recompile it. APKtool or APK Manager both work great for that.
DO A NANDROID BACKUP BEFORE PUSHING THE NEW FRAMEWORK! Sometimes you can get boot loops from screwing with other files in framework-res, or if it is not signed properly. But you shouldn't get boot loops as long as you stay away from XMLs.
how do i extract an apk? it shows up as an apk and when i click extract it does nothing
Sometimes pushing new frameworks cause boot loops fyi..
Happened to me twice :/
Sent from my T-Mobile myTouch 3G Slide using XDA App
purple1 said:
how do i extract an apk? it shows up as an apk and when i click extract it does nothing
Click to expand...
Click to collapse
Did you try renaming it to framework-res.zip rather than .apk? If you have 7-zip or winrar you can also right click, open with, and choose 7-zip or winrar from the choose default program option.
arayray said:
Sometimes pushing new frameworks cause boot loops fyi..
Click to expand...
Click to collapse
Only if you screw with the non-drawable folders. If you leave the XMLs intact and only change the images it boots fine. The boot loops are caused by incompatible or conflicting XML files, which happens when you just push a random framework-res from another ROM, you have to just move the images over.
I use apkmanager for linux and its immensely helpful. Also you can loop one even without modifying the xmls. Least I have that's why the most important part of theming is knowing how to backup/restore or flash sbf or w/e.
Only if you screw with the non-drawable folders. If you leave the XMLs intact and only change the images it boots fine. The boot loops are caused by incompatible or conflicting XML files, which happens when you just push a random framework-res from another ROM, you have to just move the images over.
Click to expand...
Click to collapse
I think you should state that in the OP
Added a note at the bottom, thanks

Razr I XT890 bloat apps safe to remove from JB?

Hi,
Just wondering if anyone has tried and tested the removal of bloatware apps from their Razr I XT890 running 4.12?
I'd be interested in cleaning the phone up a bit just to make it less crowded, I like to use real calc instead of stock calculator, go sms instead of stock messaging, zeam launcher instead of stock launcher etc etc.
I'm quite a novice when it comes to the technical side of things so would be too afraid to start deleting system apps incase they messed something up.
If anyone has seen a list compiled and could share, that would be great. Also, would it be Razr I specific, or would a general 4.12 safe removal list be safe to follow?
Any feedback appreciated
Here you can find answers.: http://forum.xda-developers.com/showthread.php?t=2223482
Read the forum.
Sent from my XT890.
Thanks a lot, have you any idea what to do with them zip files and how can I keep some of the google apps in the list? I'm not sure where to put the #?
cormie said:
Thanks a lot, have you any idea what to do with them zip files and how can I keep some of the google apps in the list? I'm not sure where to put the #?
Click to expand...
Click to collapse
I think that for you would be easier use Titanium Backup or SystemAppRemover (need root acces) to remove apps.
If you want use the zip file you have to unlock bootloader and flash CWM. In CWM you can install zip files. # you must put in front of the line where is written desired app. Updater-script you can fing in the zip file /META-INF/com/google/android/
Thanks again, I actually have my phone rooted and was able to apply the debloater, however I don't want to remove everything so will restore the backup I took before trying it, I tried install the zip file with the edited script (with the # in front of the ones I wanted to keep) but it failed to install via recovery so I must be doing it wrong
I extracted the script file, opened with wordpad, edited, closed and saved, put it uncompressed back into the zip and tried it.
that failed, so I tried open directly from the zip, edit, close and save and flash that too but that failed too the original unedited one doesn't fail.
The error I get is something referring to error in zip file.
cormie said:
I extracted the script file, opened with wordpad, edited
Click to expand...
Click to collapse
Do not use WordPad. Edify scripts require line endings to be linux style (LF only). Wordpad converts them to windows style (CR LF). Use another editor; I recommend notepad2-mod (set syntax highlighting, F12, to shell script)
See I edited and saved in wordpad and wasn't prompted to save in any other format, do you think it still saved in CR LF?
In the same script and another edit, I think I pasted something from somewhere else and went to save, but then it prompted me to save in the wordpad format itself (rtf I think it was) which I didn't, when I simply added a # or two, it just prompted to save without asking for format so it appeared to save as it was and not change anything? So you reckon it still changed it to the non-readable CRLF?
Would basic windows notepad be ok to edit it instead of having to download notepad 2?
Thanks for tyour help so far!
Maybe I'd be better just doing this via root explorer, of which I have some experience of. Is it just a case of locating each of the files listed in the script and deleting them or is there other hidden crap elsewhere that the script gets rid of which a simple root explorer delete won't?
cormie said:
See I edited and saved in wordpad and wasn't prompted to save in any other format, do you think it still saved in CR LF?
In the same script and another edit, I think I pasted something from somewhere else and went to save, but then it prompted me to save in the wordpad format itself (rtf I think it was) which I didn't, when I simply added a # or two, it just prompted to save without asking for format so it appeared to save as it was and not change anything? So you reckon it still changed it to the non-readable CRLF?
Would basic windows notepad be ok to edit it instead of having to download notepad 2?
Thanks for tyour help so far!
Click to expand...
Click to collapse
Try notepad++

[MOD] Multi DPI Camera and Samsung Keyboard

Decided to start a new thread as this one was getting a bit messy (and I couldn't change the title anymore)
http://forum.xda-developers.com/galaxy-s6/themes-apps/mod-multi-dpi-samsung-apps-camera-t3141148
----------------------------------------------------------
Hi all, after changing the dpi to 480 the camera was the main thing bugging me. Looking for a solution I found this thread:
http://forum.xda-developers.com/galaxy-s6/themes-apps/mod-fix-samsung-camera-app-device-dpi-t3131995
But that did not work for me, so I decided to try it myself and I finally managed to create multi-dpi versions of the Camera and Samsung Keyboard apps. They are based on the apks from the XtreStoLite Universal Deo-Mod Edition 1.5 as I'm currently running that. So just give it a try (backup the original apks first! I usually just rename them to "filename.org") and let me know if it works for you. I tested on 480 and 520 dpi and that works here...
Installation:
1. Backup original apk (in system\app\SamsungCamera4 and/or systemm\app\SamsungIMEv2 )
2. Extract modded apk to the corresponding folder
3. Wipe data for the app
4. Reboot
I basically modified the dimens.xml file to hardcoded pixel sizes instead of dip value, modifying dip value caused other issues for me (camcorder not working, pro mode messing up). Hopefully it's of use to some.
I have not been able to fix the Contacts/Dialer (SecContacts_L.apk in the priv-app folder)! I either get a corrupt apk (parsing error) or it just won't show up in my apps. Corrupted apk gives a parsing error when trying to install manually, otherwise it just says 'install failed'.
I am guessing this is somethiong with the priv-app folder and other restrictions there. I also tried copying the apk to the system\app folder instead but that didn't work either...
If anyone has ANY idea how to fix this? (I tried with both apktool as apk multitool).
*SCRIPTS ADDED*
Added the scripts and all I've written for this to this post for those wanting to try themselves (dpi_mod.zip). They are not completely polished so need some manual editing every now and then...
Basically, doubleclicking apk_process.bat in the root will go through the apk's in the apk subfolder and
1. Decompile them to the decompiled subfolder
2. Edit the dimens.xml file in the res\values subfolder of the decompiled folder replacing all the <n>dip values with <4*n>px (So 640 dip becomes 2560px for example...)
3. Rebuild the apk to the dpimod_apk subfolder (using the -c option to keep original manifest and signature files)
The files folder contains the files used (apktool, the subscripts for each step, signature files, (g)awk and an awk script to process the xml file replacing the values, etc)
There is also a script for signing the apk manually, but somehow the apk then also doesn;t work in my case it seems...
ALl scripts are windows batch files (and an awk file) as I mainly use windows at home. Shouldn't be too hard for the linux users to convert them to bash files if desired...
*EDIT2*
Added patched services.jar (and original services.jar for restoration in case of issues). Flash through twrp recovery... This allows you to use the modded SecContacts_L.apk supplied, the services.jar needs to be patched to disable the signature verification for the (system) apk files. Note that this might cause issues (an invalid services.jar caused my phone to get stuck in boot... had to restore the original to be able to continue) so use at your own risk!
Great job !
I have not been able to decompile the contacts.apk either.. I am a bit rusty tho.. will have to look into that a little more.
fOmey said:
Great job !
I have not been able to decompile the contacts.apk either.. I am a bit rusty tho.. will have to look into that a little more.
Click to expand...
Click to collapse
Thanks! And yeah, weird stuff.
I actually was only really bothered by the camera, not using the samsung keyboard at all myself and don't mind the contacts as much (perfectly usable for me) but it's now a matter of principle If you find anything out, I would love to hear.
dagrim1 said:
Thanks! And yeah, weird stuff.
I actually was only really bothered by the camera, not using the samsung keyboard at all myself and don't mind the contacts as much (perfectly usable for me) but it's now a matter of principle If you find anything out, I would love to hear.
Click to expand...
Click to collapse
But In Call screen looks weird with 480 DPI right? Would you know any fix for that? Thanks.
Sent from my SM-G925F using XDA Free mobile app
ksekhar said:
But In Call screen looks weird with 480 DPI right? Would you know any fix for that? Thanks.
Sent from my SM-G925F using XDA Free mobile app
Click to expand...
Click to collapse
Yup, it does. (But again, doesn't bother me as much as I don't look at it long because I usually hold my phone to my ear anyway ).
But yeah, I think I know where to fix it... It's the Contacts apk I mentioned above but there is an issue with decompiling/rebuilding it so can't fix it yet. Looking into it.
Did notice when decompiling and recompiling including resources it fails, when keeping resources intact it does work.
To successfully mod seccontacts you have to do these steps :
- Decompile apk
- Edit xml files in res folder
- Recompile apk
- Extract xml edited files in res folder from recompiled apk
- Paste these xml files in the original apk in the res folder with compression tool like Winrar
It works I made this with my S5.
Meh, been looking into it some more and also found this:
http://forum.xda-developers.com/android/software-hacking/how-to-recompile-tw-contacts-phone-t3066350
and
http://www.ez-pg.com/guide-how-to-decompilerecompile-lollipop-seccontacts.html
I tried modifying the manifest as instructed, but the apk still didn't work. Perhaps because signature verfication is not properly disabled on my rom. BUt if it isn't it is also not for the majority of the users in which case siumply supplying the apk wouldn't work anyway.
I also tried resigning the apk, no luck. Copying the original manifast is also not going to work afaik with a changed manifest file...
More info about signature verficiation:
http://forum.xda-developers.com/showthread.php?t=2725233
http://forum.xda-developers.com/showthread.php?t=2342262
Perhaps I will try this soon as well, but for now I think I'll leave it be...
sebdigital said:
To successfully mod seccontacts you have to do these steps :
- Decompile apk
- Edit xml files in res folder
- Recompile apk
- Extract xml edited files in res folder from recompiled apk
- Paste these xml files in the original apk in the res folder with compression tool like Winrar
It works I made this with my S5.
Click to expand...
Click to collapse
Thanks for the tip, had looked into that as well but this xml file is in the values folder which is not simply found in the res folder of the apk but compiled into the resources.arsc file in the apk so this is not working unfortunately.
dagrim1 said:
Thanks for the tip, had looked into that as well but this xml file is in the values folder which is not simply found in the res folder of the apk but compiled into the resources.arsc file in the apk so this is not working unfortunately.
Click to expand...
Click to collapse
I'm on 5.1.1 today and noticed that contacts/dialer is (almost) multi DPI already without having to do anything. And your camera mod works on 5.1.1 too!
Sent from my SM-G920F using XDA Free mobile app
can u change this Camera 480 dpi camera s6 to 420 dpi?
https://mega.nz/#!M4Ui0KoR!TKsPKkMl-XQHyiJ_DNf53eQCGZTrYWhuHaAnhAYXeSM
thanks you very much
can be used for other than s6 for SamsungCamera4. ??
my android device A8 6
dagrim1 said:
Decided to start a new thread as this one was getting a bit messy (and I couldn't change the title anymore)
http://forum.xda-developers.com/galaxy-s6/themes-apps/mod-multi-dpi-samsung-apps-camera-t3141148
----------------------------------------------------------
Hi all, after changing the dpi to 480 the camera was the main thing bugging me. Looking for a solution I found this thread:
http://forum.xda-developers.com/galaxy-s6/themes-apps/mod-fix-samsung-camera-app-device-dpi-t3131995
But that did not work for me, so I decided to try it myself and I finally managed to create multi-dpi versions of the Camera and Samsung Keyboard apps. They are based on the apks from the XtreStoLite Universal Deo-Mod Edition 1.5 as I'm currently running that. So just give it a try (backup the original apks first! I usually just rename them to "filename.org") and let me know if it works for you. I tested on 480 and 520 dpi and that works here...
Installation:
1. Backup original apk (in system\app\SamsungCamera4 and/or systemm\app\SamsungIMEv2 )
2. Extract modded apk to the corresponding folder
3. Wipe data for the app
4. Reboot
I basically modified the dimens.xml file to hardcoded pixel sizes instead of dip value, modifying dip value caused other issues for me (camcorder not working, pro mode messing up). Hopefully it's of use to some.
I have not been able to fix the Contacts/Dialer (SecContacts_L.apk in the priv-app folder)! I either get a corrupt apk (parsing error) or it just won't show up in my apps. Corrupted apk gives a parsing error when trying to install manually, otherwise it just says 'install failed'.
I am guessing this is somethiong with the priv-app folder and other restrictions there. I also tried copying the apk to the system\app folder instead but that didn't work either...
If anyone has ANY idea how to fix this? (I tried with both apktool as apk multitool).
*SCRIPTS ADDED*
Added the scripts and all I've written for this to this post for those wanting to try themselves (dpi_mod.zip). They are not completely polished so need some manual editing every now and then...
Basically, doubleclicking apk_process.bat in the root will go through the apk's in the apk subfolder and
1. Decompile them to the decompiled subfolder
2. Edit the dimens.xml file in the res\values subfolder of the decompiled folder replacing all the <n>dip values with <4*n>px (So 640 dip becomes 2560px for example...)
3. Rebuild the apk to the dpimod_apk subfolder (using the -c option to keep original manifest and signature files)
The files folder contains the files used (apktool, the subscripts for each step, signature files, (g)awk and an awk script to process the xml file replacing the values, etc)
There is also a script for signing the apk manually, but somehow the apk then also doesn;t work in my case it seems...
ALl scripts are windows batch files (and an awk file) as I mainly use windows at home. Shouldn't be too hard for the linux users to convert them to bash files if desired...
*EDIT2*
Added patched services.jar (and original services.jar for restoration in case of issues). Flash through twrp recovery... This allows you to use the modded SecContacts_L.apk supplied, the services.jar needs to be patched to disable the signature verification for the (system) apk files. Note that this might cause issues (an invalid services.jar caused my phone to get stuck in boot... had to restore the original to be able to continue) so use at your own risk!
Click to expand...
Click to collapse
how to fix on parse error, after recompile SamsungCamera4.apk with apktool
with or without edit error on parse...
My device Galaxy-A8

Categories

Resources