[ICS][TOOL][SOLUTION]Pictures appearing multiple times in gallery app - Galaxy S II Android Development

I had the problem that in the gallery app my albums were showing multiple instances of the same pictures.
I found a solution and wrote it on my blog:
http://www.sigterm.ch/?p=150
I'm using the experimental build of CyanogenMod 9, the latest build until now 29012012. The problem maybe because of the experimental build or not, I post it here so other users can find it too, if they have the problem...

I've got the same problem with SGS! Does this script works for SGS and how to activate! Team ICSSGS 4.0.3 RC4.2!Thanks

The script should also work on your SGS. Basically it only deletes the mediaprovider database and the data in gallery3d, this is device independent. As long you don't have your pictures in a folder named something *gallery3d* on the sdcard your good. Only thing you need is root on the phone..
You can use the script like described on my blog, exactly these commands or you can just enter the commands by themselves.

Related

[MOD] [HACK] Modifying stock Mms.apk to change user-agent

I have been reading around on the net about people previously modifying stock Mms apps on different Android based devices to change the user-agent used when sending MMS.
I can extract all the files, modify them and recompile and push back to my phone. But the strings I'm editing currently are having no effect on the messaging, or they're just causing the Mms app to FC when you add an image to the message.
Is there anyone out there that could help me with this as I'm sure a lot of people would benefit from this.
I can provide the Mms.apk extracted with the contents of classes.dex extracted too if anyone requires them.
So far I've edited the following files:
/com/android/mms/transaction/HttpUtils.smali
/com/android/mms/MmsConfig.smali
But literally only made small changes to various strings.
I hope there's someone who can help me out.
You do know the source of mms.apk is available right?
This is why I'm asking for help.
Last time I asked about the source someone told me that the latest stuff wasn't available.
This has already been done and the source is here, and the commit that added user agent selection is here.
If you want to see the code for the true stuck Mms, that can be found here.
Compiled for you and attached. There's also a whole bunch of extra bits that aren't in the stock Mms.apk like black background, customizable notifications, and other features that have been added in.
ChainsDD said:
This has already been done and the source is here, and the commit that added user agent selection is here.
If you want to see the code for the true stuck Mms, that can be found here.
Compiled for you and attached. There's also a whole bunch of extra bits that aren't in the stock Mms.apk like black background, customizable notifications, and other features that have been added in.
Click to expand...
Click to collapse
Awesome work! Works great on my Liquid.
appreciate posting the question and the Mms.apk. looks and works great on my N1.
ChainsDD said:
This has already been done and the source is here, and the commit that added user agent selection is here.
If you want to see the code for the true stuck Mms, that can be found here.
Compiled for you and attached. There's also a whole bunch of extra bits that aren't in the stock Mms.apk like black background, customizable notifications, and other features that have been added in.
Click to expand...
Click to collapse
Thanks for the info, I had seen one previously modified but it wasn't for the nexus one. I'll give this a try later.
Can I ask how you compile a single app from the git repo? I was having trouble doing it earlier and found the only way it would work successfully is if I compiled the entire OS image and took out the app I wanted. I'm clearly doing something wrong
Using ubuntu 32bit, I have the git repo already sync'd.
As far as I know, the only way to compile a single app is to compile the whole OS. Once you've compiled it all, you can just type 'make (app you want to compile)', for example 'make Mms', or 'make Launcher2', from the root directory of the source. Capitalization is critical, the apps are located in packages/apps and the folder name is what you use to make each. Once an app is compiled, it'll be located in out/target/product/passion/system/app.
ChainsDD said:
As far as I know, the only way to compile a single app is to compile the whole OS. Once you've compiled it all, you can just type 'make (app you want to compile)', for example 'make Mms', or 'make Launcher2', from the root directory of the source. Capitalization is critical, the apps are located in packages/apps and the folder name is what you use to make each. Once an app is compiled, it'll be located in out/target/product/passion/system/app.
Click to expand...
Click to collapse
Thanks, I'll try that on this current build I just compiled and see what happens.
Are there any adverse effects of compiling the stock OS and recompiling an app to then copy to a different version of the OS? I obviously don't run stock OS on my device, I run Cyanogens ROM.
Just want to make sure I could compile on 2.1-update1 and run on Cyanogens.
Often times there's no problem with that, but it's usually best to use a build environment that matches your run environment. You can download the full CM source from his github much the same was you did the stock android source, full instructions here. The only thing those instructions leave out is that after you've synced up, you need to plug your N1 in and from the source root run
Code:
cd vendor/google/passion
./extract-files.sh
That pulls in the required binaries that aren't open sourced yet.
does this work on non-rooted phones?
No. And it's implemented in just about all the custom ROMs now.
i'm about to root my phone, does this app resize pix and stuff like Handcent?
Any words for MMS mod for sense rom?
Hey there, i am just wondering weather you finally succeeded to modify your mms.apk
I am on htc with sense rom, updated to latest one. after update mod mms from cm keeps giving me FC...no longer able to use mms... i want to mod the mms.apk. any help will be very useful.
Thanks!

[USER] CM7 General Discussion thread

QUICK FAQ - 2/19/11
Q: WHAT IS THIS?
A developer port of Cyanogenmod 7 for the encore device, which has been in development for about two months starting in early January and has only recently been deemed good enough for a wider range of developers to use.​
Q: WHERE TO GET NEWS ON PROGRESS?
I will tweet progress from time to time.
Twitter: @dalingrin
We are usually in #nookie on freenode.
You can always check the Cyanogen [email protected] http://github.com/cyanogenmod​
Q: WHAT WORKS AND WHAT DOESN'T?
As of this writing, most things do work-- touchscreen, wifi, sound, accelerometer, etc.
See the issue list here: http://forum.xda-developers.com/showthread.php?t=960537​
Q: How do report a bug I find?
PLEASE post logs to pastebin.com and include them in your report.
To grab android logs you can run "adb logcat -d > log.txt"
This will output the log to the log.txt file and can then be posted on www.pastebin.com
Kernel logs can be had by running "adb shell dmeg > dmesg.txt"
This will output the dmesg log to dmesg.txt for easy posting on www.pastebin.com
Use this template to post a bug in this thread:
--------------------------------------------------------------------------
Which build are you running? Please mention any customizations:
App or process having the problem:
Steps to reproduce the problem:
Describe the issue as well as you can:
Relevant logs(logcat, dmesg)
----------------------------------------------------------------------------​
Q: WHO PORTED THIS?
Cyanogenmod itself is the creation of thousands of developers.
A vast team from around the world including members of Team Douche as well as unaffiliated individual developers have been collaborating for about two months on this port. Additional contributions continue to come from around the Internet. You are invited to help by contributing YOUR fixes.​
Q: WILL CM7 RUN OFF OF AN SD CARD? OR DOES IT USE THE INTERNAL STORAGE OF MY DEVICE?
The nightly builds are intended to run entirely off the internal storage device. Should you decide to install one of those .zip files, you should expect to overwrite whatever was installed in those partitions.
It is critical to understand that CM7 is development software that may cause serious issues, loss of data, and/or other problems with your device and to your life in general. By loading and/or running the software, you must understand and accept full responsibility for your actions and all consequences and agree to adhere to the varied licenses and terms and conditions that comprise the software. ​
Q: IS THERE AN SD-ONLY "BOOTABLE" VERSION?
Not from the nighty builds. However-- should someone want to create such a bootable SD-- (warning: Slightly technical answer all it would take to create one is a new uRamdisk file with the partitions in init.encore.rc pointing to the correct partitions on the SD card.​
Q: I AM AWARE OF THE RISKS AND ACCEPT RESPONSIBILITY FOR WHATEVER RESULTS. WHERE DO I GET THIS?
Cyanogenmod 7 for encore is available as a nightly build. See the XDA dev thread for download and development discussion:​
Q: WHAT IS "ENCORE" ANYWAY?
Cyanogenmod has a fun little convention to name ports after the device's original project name.​
Q: WHERE IS THE SOURCE?
On Github.com.​
Q: I'M A "TECCHY" PERSON-- WHAT KERNEL DOES THIS USE?
A somewhat-modified version of the "stock" 2.6.29 source provided by Barnes & Noble (in accordance with the GPL). Changes to this kernel include a fix for a temperature bug, a fix to a cache race-condition resulting in kernel panics, ext4 support, and support for large block devices, among other things.
A port to 2.6.32 is currently underway that may facilitate improved "deeper" sleep.​
Q: IS THE KERNEL OVERCLOCKED?
Just like the original stock kernel, the CM7 kernel runs at 800Mhz. However, you may overclock the default kernel to 925mhz through Cyanogenmod Settings. Cyanogenmod has a policy to not include voltage modified kernels. If you want a faster overclock see Dalingrin's 1.1 Ghz kernel: http://forum.xda-developers.com/showthread.php?t=925451
Use entirely at your own risk.​
Q: WHAT ARE THESE OTHER VERSIONS OF CM7-BASED ROMS?
Because CM7 is open-source software, people are free to modify it as they wish and re-release, provided they are compliant with the terms of the original licenses. The CM7 developers have nothing to do with these derivative releases, which may or may not be of decent quality.​Q: WHEN WILL THE FINAL VERSION BE RELEASED?
When it's ready. Please do not ask this, as it is considered the mark of a newb. In the meanwhile, nightlies are rolling out every evening with the improvements from that day, not only to the encore port in particular, but to Cyanogenmod in general.​
For a list of what's changed recently, bookmark:
--->>>>>>>>>>>>> this link <<<<<<<<<<<---
Link to the latest nightly...
http://mirror.teamdouche.net/?device=encore
The current CM7 encore zip seems like it will write to mmcblk0p5 (NC's internal EMMC). Any chance of getting one that uses something like mmcblk1p2 instead to install on my EXT4 SD Card? Why? I'd prefer my internal eclair install to remain unaffected by these experiments.
epakrat75 said:
The current CM7 encore zip seems like it will write to mmcblk0p5 (NC's internal EMMC). Any chance of getting one that uses something like mmcblk1p2 instead to install on my EXT4 SD Card? Why? I'd prefer my internal eclair install to remain unaffected by these experiments.
Click to expand...
Click to collapse
Ditto
10char
can we remove the lock screen ? ( "none" in the settings doesn't work )
fabienk said:
can we remove the lock screen ? ( "none" in the settings doesn't work )
Click to expand...
Click to collapse
A free app called no lock worked for me on other roms
Sent from one of those missing Droids
Anyone running nightlies yet? Any early reviews? Screenshots would be great too If you can even install n app to do that yet
adma84 said:
Anyone running nightlies yet? Any early reviews? Screenshots would be great too If you can even install n app to do that yet
Click to expand...
Click to collapse
I made an awful video:
http://www.youtube.com/watch?v=u1Z29zs70YE
Its fine. I got no idea on how to install it. But when video works ill look Into it. Is there a way to move the taskbar down?
Nook Color via Xda App
Install to EMMC Instructions
I dont get how to install this to EMMC. Can someone post a quick guide. Thanks in advance
myteematt said:
I dont get how to install this to EMMC. Can someone post a quick guide. Thanks in advance
Click to expand...
Click to collapse
instructions are posted in the ext4 thread.
muness said:
Caveats:
* eMMC only.
* very early test build.
Step by step instructions:
Download an ext4 compatible bootable SD recovery from http://forum.xda-developers.com/showpost.php?p=11447175&postcount=1
Verify that the download worked. md5s are at http://forum.xda-developers.com/showpost.php?p=11449725&postcount=15
Extract the .img for the .tar.gz
Burn the recovery img to an SD card as explained at http://nookdevs.com/NookColor_Rooting#Steps
Download the flashable zip. Currently available via torrent (http://tracker.cryptolect.com/IOM/update-cm-7.0.0-RC1-encore-KANG-signed.zip.torrent) and several mirrors (http://legacyschool.us.to/nookdev/cyanogenmod/update-cm-7.0.0-RC1-encore-KANG-signed.zip , http://tsunade.net/nookdev/cyanogenmod/, http://mother-douchebag.com/update-cm-7.0.0-RC1-encore-KANG-signed.zip) Check the md5 of this zip!
Download the google apps from one of the links at http://wiki.cyanogenmod.com/index.php?title=Latest_Version/Google_Apps Check the md5 of this zip!
Copy the cm7 zip and the google apps zip to the bootable SD card you created.
Unmount the SD card from your PC, insert it into your nook.
Reboot into the SD card/recovery should read version 3.0.0.6.
Under mounts Format system, data, cache.
Flash from .zip the cm7 zip and the google apps zip.
Remove the SD card.
Reboot system.
Click to expand...
Click to collapse
Hi, I watched your video on youtube, now I'm wondering what devs mean saying dsp video playback is broken, as you were playing a flash video.. can someone explain?
At this point, an sf version would be much more practical.
KitF said:
I made an awful video:
http://www.youtube.com/watch?v=u1Z29zs70YE
Click to expand...
Click to collapse
Great video, and I subscribed to your collection of videos on YouTube. Thank you for not adorning it with some idiotic music.
However, out of what I heard, I didn't understand, you sounded like Flash (10.1?) is working (and it shows full YouTube Web page where it's needed), but YouTube itself is not working. Could you elaborate on this? Could you try to adb install other versions and tweaks of YouTube apk, like "HQ" YouTube, or "signed_YouTube", or whatever?
Please post more videos on Flash/YouTube/other (mv4, avi, etc.) videos playing, Flash Web pages and elementary Flash games.
Thank you. Have posted your video in my blog, and will be posting more.
-------------------------
fineoils.blogspot.com
captive said:
Hi, I watched your video on youtube, now I'm wondering what devs mean saying dsp video playback is broken, as you were playing a flash video.. can someone explain?
Click to expand...
Click to collapse
From what Ive gathered (i could be completely wrong) it lacks video decoding drivers. Youtube.com works because its using flash and is based on the cpu. Where-as youtube apps do not use flash, and thus try to load a video codec which doesn't exist causing it to error. The youtube app alongside other non-flash video apps fail to load for me.
My Installation Diary
For those that need more in depth instructions, I logged my entire install process and am sharing. If anyone has suggestions for changes, please let me know. I might have done something different from another person, but I had no problems getting the first release installed, running and overclocked.
Your mileage may vary, I am not responsible for anything you do to your Nook, even if you did follow my advice. I am not claiming to be anything special here, just sharing what worked for me and my Nook.
faceman said:
Before beginning:
1. Booted into Recovery
2. Created new nand backup
3. Removed and stored MAIN sd
Using a new and different sd:
1. created 4gb CWR_ext4_0.1 bootable SD
2. moved flashable zip (update-cm-7.0.0-RC1-encore-KANG-signed) to SD
3. moved latest gapps (Latest Version/Google Apps - CyanogenMod Wiki) to SD
4. insert into NC
Installing
1. boot with bootable sd (CWR_ext4_0.1 - ClockworkMod Recovery v3.0.0.6
2. 'mounts and storage' --> format /system ; /data ; /cache
3. back to main menu
4. 'install zip from sdcard' --> 'choose zip from sdcard' --> select "update-cm-7.0.0-RC1-encore-KANG-signed.zip"
5. 'install zip from sdcard' --> 'choose zip from sdcard' --> select "gapps-gb-20110120-signed.zip"
6. 'mounts and storage' --> unmount sdcard --> remove sdcard
7. reboot
First Boot
1. (chills seeing that little cm7 droid boot animation)
2. @ Welcome to NookColor --> waited full 5 minutes for system to settle (?)
3. tapped Droid to begin setup
4. waited for Notification Bar to show WiFi available --> dragged down to open
5. Selected my router and logged in
6. Used built in 'Back Button' in top right of notification bar to go back to setup
7. @ Set up your Google Account --> signed in
8. @ Market Apps Installer - IMPORTANT: Read This! --> OK
9. @ Choose the apps to install --> preference i guess (gmail and google search were already installed - I added YouTube) --> ok
10. above took me to YouTube install screeen from market, seleceted Install then OK
11. @ Use Google Location --> i uncheck both since it's not a phone --> Next
12. @ Back up data --> i uncheck again --> Next
13. "Your Google Account is now linked to this phone" --> Finish setup
14. now to set time prefferences --> personal preference here (set time zone and current time will adjust) --> Next
15. WOOT! CM7 Home Screen!
16. Open Apps --> Settings --> CyanogenMod Settings --> Lockscreen --> Style Options --> Lockscreen style --> change to Sliding Tab (this is because the Rotary wheel isn't sized right yet and is real hard to use currently)
17. back @ Settings --> Applications --> check allow for Unknown Sources
18. open Market --> downloaded Titanium Backup
19. in markeet --> downloaded Screenshot It Trial
20. in market --> downloaded Flash Player 10.1
21. in market --> downloaded Linpack for Android (bench test)
22. Reboot into Recovery - forgot to flash the 1.1 oc kernel (duh)
23. 'install zip from sdcard' --> 'choose zip from sdcard' --> select "update-1100mhz-froyo_CM7-emmc-cwm.zip"
24. Reboot
Enjoying a nice overclocked CM7 build...
Click to expand...
Click to collapse
MattJ951 said:
From what Ive gathered (i could be completely wrong) it lacks video decoding drivers. Youtube.com works because its using flash and is based on the cpu. Where-as youtube apps do not use flash, and thus try to load a video codec which doesn't exist causing it to error. The youtube app alongside other non-flash video apps fail to load for me.
Click to expand...
Click to collapse
Sounds like a good enough explanation to me. Except for the part that YouTube presumably based on CPU (=software decoding?) is using Flash (? Flash requires specific hardware decoding support for its quasi-H.264 stream decoding, if none offered, it won't even install).
Missing "commercial" decoders capable to use HW assisted decoding (and rendering) in a "clean" CM7 nightly could be to blame, the question now is what decoders are missing and how to add them.
In any case, I would love to hear (and possibly see in video clips) some other experiences. Namely, my first impression was quite opposite: YouTube (inline, in a Web page, and not in apk) is now working whereas full Flash 10.1 doesn't install, or FCes if installed somehow, etc.
Lack of list with known unfixed bugs for the nightly turns the build into a puzzle. Sure the CM devs are in no way under any obligation to accommodate every piece of proprietary code (YouTube, Flash, Market, Gapps, etc.) but at least they might state simply that IVA2/DSP doesn't work yet in this initial build.
On the more positive note, I would love to hear and see the video of improved GUI responsiveness and some racing game showing nice response and detailed textures, etc. Neocore benchmark? Linpack?
aludal said:
Sounds like a good enough explanation to me. Except for the part that YouTube presumably based on CPU (=software decoding?) is using Flash (? Flash requires specific hardware decoding support for its quasi-H.264 stream decoding, if none offered, it won't even install).
Missing "commercial" decoders capable to use HW assisted decoding (and rendering) in a "clean" CM7 nightly could be to blame, the question now is what decoders are missing and how to add them.
In any case, I would love to hear (and possibly see in video clips) some other experiences. Namely, my first impression was quite opposite: YouTube (inline, in a Web page, and not in apk) is now working whereas full Flash 10.1 doesn't install, or FCes if installed somehow, etc.
Lack of list with known unfixed bugs for the nightly turns the build into a puzzle. Sure the CM devs are in no way under any obligation to accommodate every piece of proprietary code (YouTube, Flash, Market, Gapps, etc.) but at least they might state simply that IVA2/DSP doesn't work yet in this initial build.
On the more positive note, I would love to hear and see the video of improved GUI responsiveness and some racing game showing nice response and detailed textures, etc. Neocore benchmark? Linpack?
Click to expand...
Click to collapse
it's so early on, I think we are lucky to even have nightlies. I doubt they will release any 'known issues' until an RC
adma84 said:
it's so early on, I think we are lucky to even have nightlies. I doubt they will release any 'known issues' until an RC
Click to expand...
Click to collapse
yeah..., I thought so too. Still good to know that SGX GPU core has started to breathe (in GUI responsiveness and maybe in some games) instead of just sucking the battery juice for nothing.
Forgot to ask: has anyone rooted it to see and change LCD density to its physical 169.3333? Maybe some stuff with wrongly scaled lock screen, etc. will resolve better? Back arrow in a right upper corner is weird, hopefully Volume keys hack is still doable.
Forgot to ask how does new fake name "Encore" for the NC affect the completeness of the Market?

[Q] Build CM10 Mod - Ford Sync

I am currently using the HTC EVO 4G LTE. I have found with more updated roms using jellybean that the MAP profiles work and allow SMS to my Ford Mustang. There are a couple of complications though. When calling someone or receiving a call the caller id on car dash shows "Unknown" and when I receive a SMS the car thinks I sent it so when you reply it replies back to your self. I found while searching all over the internet that someone had found a way to edit a MapUtils.java file to make it work correctly. I have downloaded the source code on my ubuntu machine for CM10.0 and edited this file and built it successfully. When installed on my phone it would not get past the boot animation. Only way I got it to boot was to "fastboot" flash a boot.img file from another working CM10.0 rom. After this process the issue was resolved but It wound up breaking "Message Notification" in the Ford Sync system. Is there something I am missing about what is being changed in this file or why my original build would not boot? I would really like to use a SENSE rom but can not figure out where to build it from source (if you can) and where that file would even sit. I would appreciate it if someone could help me out with this.
Car - 2013 Ford Mustang with standard Stereo
Original Post Bellow
"Once you've got your build environment setup with CM7, CM9, or CM10, open up
packages/apps/Bluetooth/src/com/android/bluetooth/map/MapUtils/MapUtils.java and find this line (It's on line 539 as of today):
sb.append("TEL:").append(bmsg.recipient_vcard_phon e_number)
Replace it with this line:
sb.append("TEL:").append(bmsg.originator_vcard_pho ne_number)"
wilhar0046 said:
I am currently using the HTC EVO 4G LTE. I have found with more updated roms using jellybean that the MAP profiles work and allow SMS to my Ford Mustang. There are a couple of complications though. When calling someone or receiving a call the caller id on car dash shows "Unknown" and when I receive a SMS the car thinks I sent it so when you reply it replies back to your self. I found while searching all over the internet that someone had found a way to edit a MapUtils.java file to make it work correctly. I have downloaded the source code on my ubuntu machine for CM10.0 and edited this file and built it successfully. When installed on my phone it would not get past the boot animation. Only way I got it to boot was to "fastboot" flash a boot.img file from another working CM10.0 rom. After this process the issue was resolved but It wound up breaking "Message Notification" in the Ford Sync system. Is there something I am missing about what is being changed in this file or why my original build would not boot? I would really like to use a SENSE rom but can not figure out where to build it from source (if you can) and where that file would even sit. I would appreciate it if someone could help me out with this.
Car - 2013 Ford Mustang with standard Stereo
Original Post Bellow
"Once you've got your build environment setup with CM7, CM9, or CM10, open up
packages/apps/Bluetooth/src/com/android/bluetooth/map/MapUtils/MapUtils.java and find this line (It's on line 539 as of today):
sb.append("TEL:").append(bmsg.recipient_vcard_phon e_number)
Replace it with this line:
sb.append("TEL:").append(bmsg.originator_vcard_pho ne_number)"
Click to expand...
Click to collapse
Cannot build from Sense ROM source. You'd have to smali edit if you're experienced with byte code.
However looking at the code posted, seems like whatever you quoted is adding a space in phone_number (phon e_number).
Make sure when you replace the code you take out the space to read:
Code:
sb.append("TEL:").append(bmsg.originator_vcard_phone_number)
exSD said:
Cannot build from Sense ROM source. You'd have to smali edit if you're experienced with byte code.
However looking at the code posted, seems like whatever you quoted is adding a space in phone_number (phon e_number).
Make sure when you replace the code you take out the space to read:
Code:
sb.append("TEL:").append(bmsg.originator_vcard_phone_number)
Click to expand...
Click to collapse
Thank you for your response. I did make sure that the space was taken out of that line. The author of the original post must have done it by accident. Not sure if I would get the same rests if I tried to build a aokp ROM instead of CM. The build worked just would not boot with originally boot.img file. I fixed the main issue that I was attempting but broke other things that were already working.
wilhar0046 said:
Thank you for your response. I did make sure that the space was taken out of that line. The author of the original post must have done it by accident. Not sure if I would get the same rests if I tried to build a aokp ROM instead of CM. The build worked just would not boot with originally boot.img file. I fixed the main issue that I was attempting but broke other things that were already working.
Click to expand...
Click to collapse
Are you signing the apk once you recompile it?
Post a snapshot of your code or I can run a join.me session with you to look at it with you.
exSD said:
Are you signing the apk once you recompile it?
Post a snapshot of your code or I can run a join.me session with you to look at it with you.
Click to expand...
Click to collapse
I am creating a ROM not a application. I am building CM from source and compiling it. I end up with a flashabe zip of the ROM I can flash with TWRP or CWM recoveries.
wilhar0046 said:
I am creating a ROM not a application. I am building CM from source and compiling it. I end up with a flashabe zip of the ROM I can flash with TWRP or CWM recoveries.
Click to expand...
Click to collapse
You are compiling a ROM and editing the Maps application.
Link me to the git/source you're editing the java code from.
exSD said:
You are compiling a ROM and editing the Maps application.
Link me to the git/source you're editing the java code from.
Click to expand...
Click to collapse
Here is the code I used to get the source
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
exSD said:
You are compiling a ROM and editing the Maps application.
Link me to the git/source you're editing the java code from.
Click to expand...
Click to collapse
BTW MAP is referring to Message Access Profile/Protocol ..not sure which p it is lol. It allows Bluetooth devices to access certain messages on your phone such as Text messages. The car can receive them and read them aloud. The hole point in editing the java file is so that the text appears to come from the correct sender instead of me. I could not make my original build work. Something is wrong with the boot.IMG file. When I flash a working boot.IMG over my existing build it boots and fixes the initial problem but winds up breaking other things that were originally workong., such as message notifications.

[Q][SOLVED, partially] modifying environment variable DIRECTORY_DCIM system-wide

Hello,
Problem:
My Meizu MX3 (runs Flyme os 3 based on android 4.2.2) has preset "Camera" in the DIRECTORY_DCIM environment variable. Most of the camera apps respect this setting and they are saving photos in the Camera instead of the DCIM. This causes problems with automatic syncing, because photos are obviously expected to be in the DCIM.
Partial solutions:
I tried symlinking the two dirs, but as far as i know it is not possible in the FUSE used since the 4.2.2.
mount -o bind led to the duplicity in the gallery app and i don't consider it too "clean" solution.
I ended up with modifying source of Focal open source camera not to read DIRECTORY_DCIM env var, but rather just to save the picture into the DCIM directly.
Is there a way to change this variable on boot? I don't want to use any 3rd party apps for simple things like this. Editing init.rc led to nothing, because it is always replaced by the default one from the ramdisk.
Thanks in advance.
Have you tried making an init.d script to export the value you want? I haven't looked at the source code so I don't know if that'll make a difference, but that's the only thing I can think of, short of modifying the API call using e.g. Xposed (somewhat similar to what this mod does.)
You may want to link the SO question you also created, in case you get a working answer there, so anyone stumbling on this page will find the way to that.
The init.d dir was not on my phone, so i tried creating it. Scripts from there do not get run on the startup, which brings me back to the problem with editing init.rc.
I will probbly just keep using modified camera until they release Ubuntu mobile for mx3 - which according to rumors could be soon
Thank you for your time
Sent from my M353 using XDA Premium 4 mobile app
Check if in your init.rc there is something like
Code:
service flash_recovery /system/etc/install-recovery.sh
Then you can edit/create that script and enable running init.d scripts with:
Code:
busybox run-parts /system/etc/init.d
search on this forum for more info
Sent from my ZP980 using Tapatalk
Thank you, your guide worked and my scripts in init.d now get executed
Sadly, exporting the variable in script residing in init.d does nothing (the script itself gets executed, i tried echoing "test" in file). There must be something, which keeps reseting the DIRECTORY_DCIM to its original value, or else i'm out of ideas
Or am i assuming incorrectly, that Java code
Code:
Environment.DIRECTORY_DCIM
should read env variable settable by
Code:
export DIRECTORY_DCIM="DCIM"
?
Actually now that you say that I checked my init.rc and I don't have that. Plus if I try
Code:
echo DIRECTORY_DCIM
I have nothing, so at least for me it's not set there.
Sent from my ZP980 using Tapatalk
For me echoing the varible also returns nothing, but reading it by Java returns "Camera".
Since it was my only clue, i hoped it could be reset by exporting DIRECTORY_DCIM (since android docs states that
android.os.Environment provides acces to environment vars) I guess i was wrong.
Is there any other kind of emvironment variables, i am not aware of?
Sent from my M353 using Tapatalk
I checked that variable is hardcoded in the android.os.Environment class.
I can think of three methods to test to change that but I didn't test any:
Use exposed framework to change the call that gets DIRECTORY_DCIM, if that's possible it's probably the best choice.
Edit and compile again android.os.Environment (I have no idea how to do that or if it's even possible)
Make a script that monitors your X folder to move pictures to DCIM folder
I can help you with the last one
The xposed is great idea, but unfortunately it doesn't work. It says "unknown option -- c" which as far as i know has something to do with bad (probably outdated?) version of SU. Meizu's firmware is probably more customized android than i previously thought.
Now i'm using the solution you also advised - i am automatically moving media from Camera to DCIM - i was hoping for more clean solution, but i guess this is as close as i'll ever get (don't get me wrong, it works as it is supposed to. I'm just a perfectionist )
Thank's for your time.
np I'm a perfectionist too and it's always cool to learn how things work and can be hacked
Sent from my ZP980 using Tapatalk

[Q] Issue with installing an app

Hi everyone,
I'm new on xda and I come here because I struggle to install this app on my rooted Galaxy S4 with CyanogenMod 11: "Paiement mobile (pour Orange)" (sorry, I'm new, so I cannot post urls).
In fact, this app has not been declared by the devs (on the Google Play) to be compatible with my phone, despite the fact that I have the specs to run it (NFC payment).
I asked a friend who was able to download the app to upload it on Aptoide, giving me the opportunity to download the apk on my phone (this apk is available in this thread). I tried to install it, but I get the following the error: "app not installed".
I would like to force the installation of the app. I tried many ways, like using apps that use root access on the phone, without success (for example, I tried with "System Apps Installer" on the Google Play, but I get a problem with mounting /system). I also tried to install it with the command line tool, but I get the error "[install_failed_invalid_uri]". I tried to change the permission of the /data/local directory and /data/local/tmp with ES file explorer, but it did not change anything.
In addition to this, I'm not able to enable usb debugging in the developper options (to install the apk with adb), because every time I activate the option, it becomes disabled in the following seconds.
It seems to be a little bit complicated, because I seem to have different problems, but I hope that someone here will be able to help me !
Thanks for your help,
Aquignis.
The issue is most likely Cm. They alter things so some that normally work no longer work
I suceeded to solve the "[install_failed_invalid_uri]" error in the command line tool by also changing the permissions of /data.
After that, I got another error (yes, one more, but the last) that made me discovering what's the real problem in this situation: "install_failed_missing_shared_library". By doing some researches on the web and exploring the apk, I understood that the app use a library called "org.simalliance.openmobileapi" that corresponds to the work of SIMalliance, who developped an API called "Open Mobile API", which notably enables communication with NFC sim cards and must be integrated to the build of the ROM. This system is used by many banks in Europe and has been integrated in the stock ROM of many NFC devices by the important manufacturers, but not by Cyanogenmod devs in the last stable release of CM 11 for the Galaxy S4.
Like you said it, the problem was CM
I asked them if it has been integrated in CM 12, because that is why the app is said to be incompatible with my device by Google Play which automatically checks which libraries are installed on your device (I'm waiting for their answer). The other solution would be to add the library to the CM build by myself, because it seems not to be very complicated, but I'm not qualified enough to do this !
If it is not part of aosp I wouldn't count on it being added to be honest. Not to mention most banking apps refuse to work if the Rom has root as it can cause security issues.
Yes, the root seems to be a problem with some apps according to the work of this man.
On the other hand, I think that this API is important enough to make CM devs pay attention to it, because it is used in many countries (except the USA which use only HCE, I believe). If only I was able to build it myself !

Categories

Resources