[TUTORIAL] How to add Autostarts Option in Settings - Sony Cross-Device General

XDA PORTAL
Click to expand...
Click to collapse
Hello everyone
Today i will teach you how to add Autostarts
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
REQUIREMENTS:
You need to know how to decompile, compile and sign an apk.
Notepad++
A Deoxeded Rom.
Settings.apk
The attachment View attachment autostarts-files.rar
If you are using apktool 2.x.x download this file:View attachment 2709395 thanks incodnita
STEPS:
1. Download the attachment.
2. Decompile your Settings.apk.
3. Navigate to res\xml\settings_headers.xml
Now add the following line (Make sure that there is no space between autostarts and LewaManageAutostarts)
<header android:icon="@drawable/ic_settings_autostarts" android:id="@id/autostarts_settings" android:title="@string/autostarts_title" android:fragment="com.android.settings.autostarts.LewaManageAutostarts" />
Click to expand...
Click to collapse
Screenshot
4. Save it and close it.
5. In the xml folder, paste from the downloaded folder the autostarts_settings_header.
6. Now navigate to \res\values\ strings.xml. Add the following lines:
<string name="autostarts_title">Autostarts</string>
<string name="autostarts_allowed">Has allowed</string>
<string name="autostarts_prohibited">Has Prohibited</string>
<string name="autostarts_allow_progress_msg">Being Boot restored, Please wait ...</string>
<string name="autostarts_prohibit_progress_msg">Prohibit Boot, Please wait ...</string>
<string name="autostarts_empty_msg">No Installation Boot applications</string>
<string name = "autostarts_optimize_empty_msg">No optimize the Startup Items</string>
<string name="autostarts_optimize_btn_title">Optimize the Startup Items</string>
<string name="autostarts_all_btn_title">Autostarts All Items</string>
Click to expand...
Click to collapse
Screenshot
7. Save it and close it.
8. Now navigate to \res\values\ids.xml. Add the following lines:
<item type="id" name="autostarts_settings">false</item>
<item type="id" name="appName">false</item>
Click to expand...
Click to collapse
Screenshot
9. Now paste from the folder your downloaded the ic_settings_autostarts icon in drawable-xdpi folder.
10. Now paste from the downloaded folder the manage_autostarts and the manage_autostarts_item in the layout folder.
12. Now copy from the attachment the whole autostarts folder to: smali/com/android/settings/
13.Now compile your Settings.apk
14. Now decompile the Settings.apk you just compiled.
NOW IT'S THE HARD PART, SO BE CAREFUL! ALSO THE IDS PROBABLY WILL BE DIFFERENT FOR YOU, SO DON'T COPY THE ONE YOU SEE​
14. Navigate to res\values\public.xml and open it.
15. Navigate to smali\com\android\settings\autostarts\LewaManageAutostarts.smali
16. In public.xml find manage_autostarts
17. Copy the id and paste it in LewaManageAutostarts.smali line 632
Screenshot
18. You have to follow this procedure for the next lines:
In public.xml we look for: manage_autostarts
In LewaManageAutostarts.smali we register the id in the line 632
In public.xml we look for: autostarts_allowed
In LewaManageAutostarts.smali we register the id in the line 305
In public.xml we look for: autostarts_prohibited
In LewaManageAutostarts.smali we register the id in the line 401
In public.xml we look for: autostarts_allow_progress_msg
In LewaManageAutostarts.smali we register the id in the line 831
In public.xml we look for: autostarts_prohibit_progress_msg
In LewaManageAutostarts.smali we register the id in the line 190
In public.xml we look for: autostarts_empty_msg
In LewaManageAutostarts.smali we register the id in the line 688 and 772
In public.xml we look for: autostarts_optimize_empty_msg
In LewaManageAutostarts.smali we register the id in the line 799
In public.xml we look for: autostarts_optimize_btn_title
In LewaManageAutostarts.smali we register the id in the line 612 and 765
In public.xml we look for: autostarts_all_btn_title
In LewaManageAutostarts.smali we register the id in the line 792 and 584
19. Now save the LewaManageAutostarts.smali and close it.
20. Now open the LewaManageAutostarts$AppAdapter.smali
21. As before:
In public.xml we look for: <public type="layout" name="manage_autostarts_item"
In LewaManageAutostarts$AppAdapter.smali we restiger the id in the line 164
In public.xml we look for: <public type="id" name="icon"
In LewaManageAutostarts$AppAdapter.smali we restiger the id in the line 174
In public.xml we look for: <public type="id" name="appName"
In LewaManageAutostarts$AppAdapter.smali we restiger the id in the line 195
In public.xml we look for: <public type="id" name="status"
In LewaManageAutostarts$AppAdapter.smali we restiger the id in the line 217
In public.xml we look for: <public type="id" name="app_on_sdcard"
In LewaManageAutostarts$AppAdapter.smali we restiger the id in the line 236
22. Save the file and close it.
23. Now recompile your Settings.apk and sign it.
24. Enjoy!

Thanks @Pandemic for the icon

Cool tutorial.. Nice job.. :good:

Awsommmmm.. Like Always... :laugh: :good:

greaaaaaat ! :victory::victory:
ill try to make it into chinese
--------------------------------------------------
eh..step 6 should be
<string name="autostarts_allowed">Has allowed</string>
--------------------------------------------------
for chinese it must delete the following item [in "res\layout\manage_autostarts_item.xml" line 8 "id/status"]
othervise ull see weird status

Nice tutorial bro @DaRk-L0rD
Keep up the good work !!
What we always do as a team: Recognized MoonBreakers
Sent From Cybertron With My Powerfull Xperia P

error on first compiling, xperia TX
Code:
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: F:\AndroidAppsEditor\.\Applications\Temp\Settin
gs.apk-Decompiled\res/mipmap-xxhdpi
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\sigit\AppData\Local\Temp\A
PKTOOL20589.tmp, -I, C:\Users\sigit\apktool\framework\1.apk, -S, F:\AndroidAppsE
ditor\.\Applications\Temp\Settings.apk-Decompiled\res, -M, F:\AndroidAppsEditor\
.\Applications\Temp\Settings.apk-Decompiled\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:251)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:324)
at brut.androlib.Androlib.buildResources(Androlib.java:269)
at brut.androlib.Androlib.build(Androlib.java:192)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:185)
at brut.apktool.Main.main(Main.java:70)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\sigit\AppData\Local\Temp\APKTOOL20589.tmp, -I, C:\Users\sigit\apktool\frame
work\1.apk, -S, F:\AndroidAppsEditor\.\Applications\Temp\Settings.apk-Decompiled
\res, -M, F:\AndroidAppsEditor\.\Applications\Temp\Settings.apk-Decompiled\Andro
idManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:249)
... 6 more

Hi,
I followed the instructions to the letter.
I got to compiling and decompiling, then went to public.xml and against "Manage_autostarts", the value was "0x7f04008b" in my case,
however, when i went to smali/com/android/settings there was no folder named "autostarts\LewaManageAu tostarts.smali"
What to do about that?

neXus PRIME said:
Hi,
I followed the instructions to the letter.
I got to compiling and decompiling, then went to public.xml and against "Manage_autostarts", the value was "0x7f04008b" in my case,
however, when i went to smali/com/android/settings there was no folder named "autostarts\LewaManageAu tostarts.smali"
What to do about that?
Click to expand...
Click to collapse
@neXus PRIME
cant you add that folder then ?
Correct me if im wrong, im not always an einstein xD

Pandemic said:
@neXus PRIME
cant you add that folder then ?
Correct me if im wrong, im not always an einstein xD
Click to expand...
Click to collapse
Dont be rude. I figured that out and was going to edit my comment. THanks anyways.:good:

neXus PRIME said:
Dont be rude. I figured that out and was going to edit my comment. THanks anyways.:good:
Click to expand...
Click to collapse
@neXus PRIME
im not rude :/
i just ask it normal and nice if you can add that folder
Ok i see good mate

@neXus PRIME the ids are different for each user. Thanks for letting me know that because i didn't mention it on the tutorial. I just edited the OP adding this detail

Pandemic said:
@neXus PRIME
im not rude :/
i just ask it normal and nice if you can add that folder
Ok i see good mate
Click to expand...
Click to collapse
haha, i thought you were being sarcastic... :laugh::laugh:
No hard feelings.
Thanks OP for the mod. I recompiled and booted fine.
I see the Autostart option in Settings, but it force closes on launch. Any clues?
Btw, i have Xperia SP, 4.1.2.
Logcat:
Code:
W/dalvikvm( 3624): dvmFindClassByName rejecting 'com.android.settings.autostarts
. LewaManageAutostarts'
W/dalvikvm( 3624): threadid=1: thread exiting with uncaught exception (group=0x4
0db5650)
E/AndroidRuntime( 3624): FATAL EXCEPTION: main
E/AndroidRuntime( 3624): java.lang.RuntimeException: Unable to start activity Co
mponentInfo{com.android.settings/com.android.settings.SubSettings}: android.app.
Fragment$InstantiationException: Unable to instantiate fragment com.android.sett
ings.autostarts. LewaManageAutostarts: make sure class name exists, is public, a
nd has an empty constructor that is public
E/AndroidRuntime( 3624): at android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2070)
E/AndroidRuntime( 3624): at android.app.ActivityThread.handleLaunchActivi
ty(ActivityThread.java:2095)
E/AndroidRuntime( 3624): at android.app.ActivityThread.access$600(Activit
yThread.java:137)
E/AndroidRuntime( 3624): at android.app.ActivityThread$H.handleMessage(Ac
tivityThread.java:1206)
E/AndroidRuntime( 3624): at android.os.Handler.dispatchMessage(Handler.ja
va:99)
E/AndroidRuntime( 3624): at android.os.Looper.loop(Looper.java:213)
E/AndroidRuntime( 3624): at android.app.ActivityThread.main(ActivityThrea
d.java:4793)
E/AndroidRuntime( 3624): at java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime( 3624): at java.lang.reflect.Method.invoke(Method.java:5
11)
E/AndroidRuntime( 3624): at com.android.internal.os.ZygoteInit$MethodAndA
rgsCaller.run(ZygoteInit.java:789)
E/AndroidRuntime( 3624): at com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:556)
E/AndroidRuntime( 3624): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 3624): Caused by: android.app.Fragment$InstantiationException:
Unable to instantiate fragment com.android.settings.autostarts. LewaManageAutos
tarts: make sure class name exists, is public, and has an empty constructor that
is public
E/AndroidRuntime( 3624): at android.app.Fragment.instantiate(Fragment.jav
a:584)
E/AndroidRuntime( 3624): at android.preference.PreferenceActivity.switchT
oHeaderInner(PreferenceActivity.java:1132)
E/AndroidRuntime( 3624): at android.preference.PreferenceActivity.switchT
oHeader(PreferenceActivity.java:1148)
E/AndroidRuntime( 3624): at android.preference.PreferenceActivity.onCreat
e(PreferenceActivity.java:539)
E/AndroidRuntime( 3624): at com.android.settings.Settings.onCreate(Settin
gs.java:151)
E/AndroidRuntime( 3624): at android.app.Activity.performCreate(Activity.j
ava:5008)
E/AndroidRuntime( 3624): at android.app.Instrumentation.callActivityOnCre
ate(Instrumentation.java:1079)
E/AndroidRuntime( 3624): at android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2034)
E/AndroidRuntime( 3624): ... 11 more
E/AndroidRuntime( 3624): Caused by: java.lang.ClassNotFoundException: com.androi
d.settings.autostarts. LewaManageAutostarts
E/AndroidRuntime( 3624): at dalvik.system.BaseDexClassLoader.findClass(Ba
seDexClassLoader.java:61)
E/AndroidRuntime( 3624): at java.lang.ClassLoader.loadClass(ClassLoader.j
ava:501)
E/AndroidRuntime( 3624): at java.lang.ClassLoader.loadClass(ClassLoader.j
ava:461)
E/AndroidRuntime( 3624): at android.app.Fragment.instantiate(Fragment.jav
a:574)
E/AndroidRuntime( 3624): ... 18 more
W/ActivityManager( 678): Force finishing activity com.android.settings/.SubSe
ttings
D/PowerManagerService( 678): acquireWakeLock flags=0x1 tag=ActivityManager-Laun
ch
W/ActivityManager( 678): Force finishing activity com.android.settings/.Setti
ngs
I/CrashMonitor( 3263): CrashMonitorServiceBroadcastReceiver: Forwarding intent:
android.intent.action.DROPBOX_ENTRY_ADDED tag: system_app_crash
I/CrashMonitor( 3263): CrashMonitorService: Service started...
I/CrashMonitor( 3263): CrashMonitorService: onHandleIntent action: android.inten
t.action.DROPBOX_ENTRY_ADDED

neXus PRIME said:
haha, i thought you were being sarcastic... :laugh::laugh:
No hard feelings.
Thanks OP for the mod. I recompiled and booted fine.
I see the Autostart option in Settings, but it force closes on launch. Any clues?
Btw, i have Xperia SP, 4.1.2.
Click to expand...
Click to collapse
Could be due to missing files, wrong ids bro

DaRk-L0rD said:
Could be due to missing files, wrong ids bro
Click to expand...
Click to collapse
Just did a double check... everything seems to be fine...
If you would be kind enough to check it for me...
I am attaching the 2 smalis and public.xml
You can verify for me?
EDIT: removed files on OP request

does this mod work on 4.1.2?? maybe i am trying in vain?
Does it work on xperia sp?

neXus PRIME said:
haha, i thought you were being sarcastic... :laugh::laugh:
No hard feelings.
Click to expand...
Click to collapse
Hahaha no ofcourse not @neXus PRIME ]that was meant to myself
ok then is it alright
neXus PRIME said:
does this mod work on 4.1.2?? maybe i am trying in vain?
Does it work on xperia sp?
Click to expand...
Click to collapse
Yes it works also on 4.1.2 and also on Xperia SP !
I was the 1st one that have autostart on my Xperia P (with 4.1.2) and my bro @DaRk-L0rD
posted this awesome tutorial with my permissions so everyone can have it

Pandemic said:
Hahaha no ofcourse not @neXus PRIME ]that was meant to myself
ok then is it alright
Yes it works also on 4.1.2 and also on Xperia SP !
I was the 1st one that have autostart on my Xperia P (with 4.1.2) and my bro @DaRk-L0rD
posted this awesome tutorial with my permissions so everyone can have it
Click to expand...
Click to collapse
So can you please check whats wrong at my end?
i posted the xml n smalis.... you can check whether i pasted the correct ids or not. Much appreciated.

@Pandemic
I am unable to PM you so asking here:
If i have your permission, can i share the modded file of settings with autostarts as flashable zip on xperia sp forum? because not may users can do it on their own. Thanks in advance:good::good::good:
@ OP
It worked... i PMed it to you as well. Thanks.

neXus PRIME said:
@Pandemic
I am unable to PM you so asking here:
If i have your permission, can i share the modded file of settings with autostarts as flashable zip on xperia sp forum? because not may users can do it on their own. Thanks in advance:good::good::good:
@ OP
It worked... i PMed it to you as well. Thanks.
Click to expand...
Click to collapse
@neXus PRIME
yes i disabled it because people pm me alot and it drives met nuts.
sure you may share it but give proper credits

Related

[HOWTO] enable on-screen buttons in ICS rom

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
sorry for my poor english.. i write this guide by request.
this is pretty simple thing..
1. decompile framework-res.apk
- you need apktool.jar 1.4.3 version to decompile ics apk.
download 1.4.3 : http://code.google.com/p/android-apktool/downloads/list
download 1.4.2 : http://code.google.com/p/android-apktool/downloads/detail?name=apktool1.4.2.tar.bz2&can=1&q=
(if you have problems with 1.4.3, use 1.4.2 instead)
2. open /res/values/bools.xml with a text editor
3. find "config_showNavigationBar" and set to true
4. to turn off capacitive buttons backlight, maybe you need to edit arrays.xml
- it does not work on my nexus s but seem to be working well on some other devices..
-----------------------------------------------------------------------------
* 5 [WVGA devices only] it would be better to slightly resize navigation bar height to avoid keyboard overlapping problem (see this post).
(or you have to lower lcd density but that cause app compatibility issues)
: open dimens.xml and find the line "navigation_bar_height".
and you need one more step to compensate buttons sizes.
download : http://www.mediafire.com/?758mnayrlt3dee4
this zip include 4 png files. add those files to SystemUI.apk (/res/drawable-hdpi/) using 7-zip or other program. (replace original PNGs to these files).
-----------------------------------------------------------------------------
6. recompile
- you need new aapt.exe from latest platform-tools.
download : http://www.mediafire.com/?0q52u6v8vdkpq1i
7. done
*if you don't know how to modify apk file, read this post first.
-
Where did you get apktool 1.4.2?
How would I disable the onscrwen keys in twlauncher 4. 5? Cause we already configured the ics keys to be our softkeus?
Sent from my SCH-I400 using xda premium
KBanause said:
Where did you get apktool 1.4.2?
Click to expand...
Click to collapse
yes interesting question
KBanause said:
Where did you get apktool 1.4.2?
Click to expand...
Click to collapse
here it is : http://www.multiupload.com/YWJHOSZ7GJ
you can find it here
ciscogee said:
How would I disable the onscrwen keys in twlauncher 4. 5? Cause we already configured the ics keys to be our softkeus?
Sent from my SCH-I400 using xda premium
Click to expand...
Click to collapse
sorry but you'd better ask your rom dev to do it..
evilisto said:
here it is : http://www.multiupload.com/YWJHOSZ7GJ
you can find it here
Click to expand...
Click to collapse
Thanks. At least I was able to recompile the framework-res.apk wothout any errors. Now I have to check if I can use it without bootloops
evilisto said:
here it is : http://www.multiupload.com/YWJHOSZ7GJ
you can find it here
sorry but you'd better ask your rom dev to do it..
Click to expand...
Click to collapse
Worked for me with this apktool
Edit: decompile that is
THX!
Could you got a little more in-depth on step 5? Whats the correct way to recompile the apk with aapt?
pingpongboss said:
Could you got a little more in-depth on step 5? Whats the correct way to recompile the apk with aapt?
Click to expand...
Click to collapse
just put aapt.exe in the same folder as apktool.jar. that's all
can someone please help me with using apktool and decompiling my framework-res?
I'm not having any trouble with decompiling, but after making the necessary changes to bools and array, I can not get it to recompile.
What am I doing wrong here?
to decompile....
Code:
apktool d framework-res.apk
....make the changes, then...
Code:
apktool b framework-res
and i get this:
Code:
c:\apktool>apktool b framework-res.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:142)
at brut.androlib.Androlib.build(Androlib.java:159)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:138)
... 4 more
c:\apktool>
Any help would be much appreciated.
EDIT -
Just noticed that I typed....
Code:
apktool b framework-res.apk
...instead of...
Code:
apktool b framework-res
When I tried it without the .apk, I get this....
Code:
c:\apktool>apktool b framework-res
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: c:\apktool\framework-res\res/drawable-sw600dp-h
dpi
invalid resource directory name: c:\apktool\framework-res\res/layout-sw600dp
invalid resource directory name: c:\apktool\framework-res\res/layout-w600dp
invalid resource directory name: c:\apktool\framework-res\res/values-h720dp
invalid resource directory name: c:\apktool\framework-res\res/values-sw600dp
invalid resource directory name: c:\apktool\framework-res\res/values-sw600dp-w10
24dp
invalid resource directory name: c:\apktool\framework-res\res/values-sw600dp-w12
80dp
invalid resource directory name: c:\apktool\framework-res\res/values-w360dp
invalid resource directory name: c:\apktool\framework-res\res/values-w480dp
invalid resource directory name: c:\apktool\framework-res\res/values-w500dp
invalid resource directory name: c:\apktool\framework-res\res/values-w600dp
invalid resource directory name: c:\apktool\framework-res\res/values-w720dp
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\BRANDO~1.AMY\AppData\Local
\Temp\APKTOOL5284591862303952400.tmp, -x, -S, c:\apktool\framework-res\res, -M,
c:\apktool\framework-res\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\BRANDO~1.AMY\AppData\Local\Temp\APKTOOL5284591862303952400.tmp, -x, -S, c:\
apktool\framework-res\res, -M, c:\apktool\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
sixfearstheseven said:
I'm not having any trouble with decompiling, but after making the necessary changes to bools and array, I can not get it to recompile.
What am I doing wrong here?
to decompile....
Code:
apktool d framework-res.apk
....make the changes, then...
Code:
apktool b framework-res
and i get this:
Code:
c:\apktool>apktool b framework-res.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:142)
at brut.androlib.Androlib.build(Androlib.java:159)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:138)
... 4 more
c:\apktool>
Any help would be much appreciated.
EDIT -
Just noticed that I typed....
Code:
apktool b framework-res.apk
...instead of...
Code:
apktool b framework-res
When I tried it without the .apk, I get this....
Code:
c:\apktool>apktool b framework-res
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: c:\apktool\framework-res\res/drawable-sw600dp-h
dpi
invalid resource directory name: c:\apktool\framework-res\res/layout-sw600dp
invalid resource directory name: c:\apktool\framework-res\res/layout-w600dp
invalid resource directory name: c:\apktool\framework-res\res/values-h720dp
invalid resource directory name: c:\apktool\framework-res\res/values-sw600dp
invalid resource directory name: c:\apktool\framework-res\res/values-sw600dp-w10
24dp
invalid resource directory name: c:\apktool\framework-res\res/values-sw600dp-w12
80dp
invalid resource directory name: c:\apktool\framework-res\res/values-w360dp
invalid resource directory name: c:\apktool\framework-res\res/values-w480dp
invalid resource directory name: c:\apktool\framework-res\res/values-w500dp
invalid resource directory name: c:\apktool\framework-res\res/values-w600dp
invalid resource directory name: c:\apktool\framework-res\res/values-w720dp
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\BRANDO~1.AMY\AppData\Local
\Temp\APKTOOL5284591862303952400.tmp, -x, -S, c:\apktool\framework-res\res, -M,
c:\apktool\framework-res\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\BRANDO~1.AMY\AppData\Local\Temp\APKTOOL5284591862303952400.tmp, -x, -S, c:\
apktool\framework-res\res, -M, c:\apktool\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
Click to expand...
Click to collapse
Same here, getting the same error when recompiling it -_- 3 people have told me it's because aapt isn't the ICS version but I updated it 3 times and even asked someone to upload and I get that same error.
GazaIan said:
Same here, getting the same error when recompiling it -_- 3 people have told me it's because aapt isn't the ICS version but I updated it 3 times and even asked someone to upload and I get that same error.
Click to expand...
Click to collapse
Yep, i did the same thing with aapt. I triple and quadruple checked that it was the ICS compatible version, but still no dice.
I don't know. I'm still patiently waiting for a proper developer to throw together a version for the Incredible that has the on screen nav buttons since i know next to nothing about this stuff, but seriously, this process looks so simple yet I'm having so much trouble with it.
Even if i did get it to compile, I'd be stuck because adb never wants to push or pull files from my phone.
Sent from my Incredible using xda premium
sixfearstheseven said:
Yep, i did the same thing with aapt. I triple and quadruple checked that it was the ICS compatible version, but still no dice.
I don't know. I'm still patiently waiting for a proper developer to throw together a version for the Incredible that has the on screen nav buttons since i know next to nothing about this stuff, but seriously, this process looks so simple yet I'm having so much trouble with it.
Even if i did get it to compile, I'd be stuck because adb never wants to push or pull files from my phone.
Sent from my Incredible using xda premium
Click to expand...
Click to collapse
You can always copy it over and set permissions (although it usually crashes before you can), or put it in an update.zip. The update.zip method is my favorite.
GazaIan said:
You can always copy it over and set permissions (although it usually crashes before you can), or put it in an update.zip. The update.zip method is my favorite.
Click to expand...
Click to collapse
How does that work? Sorry, I'm pretty new to all of this. Do I just zip up the framework apk, name it update.zip, then flash it in CWM? Or is there more to it?
If it's that easy, that would be awesome, if only I could get the apk to compile.
I'm so frustrated with this that I'm about willing to offer a donation to someone who could do it for me, although it would be much more satisfying if I could get it done on my own. Maybe I could give a donation to someone who could successfully walk me through it. The offers out there of anyone wants to take it.
Sent from my Incredible using xda premium
sixfearstheseven said:
Yep, i did the same thing with aapt. I triple and quadruple checked that it was the ICS compatible version, but still no dice.
I don't know. I'm still patiently waiting for a proper developer to throw together a version for the Incredible that has the on screen nav buttons since i know next to nothing about this stuff, but seriously, this process looks so simple yet I'm having so much trouble with it.
Even if i did get it to compile, I'd be stuck because adb never wants to push or pull files from my phone.
Sent from my Incredible using xda premium
Click to expand...
Click to collapse
try again with this aapt... : http://www.mediafire.com/?0q52u6v8vdkpq1i
evilisto said:
try again with this aapt... : http://www.mediafire.com/?0q52u6v8vdkpq1i
Click to expand...
Click to collapse
Were you able to get it to work with that?
I found a work around two days ago. I took the customized XML files and put them in a Metamorph zip file. I ran it and it successfully changed framework-res.apk but the navigation buttons still wouldn't show. Now, I don't know much about this, so I'm not sure if doing it that way should have worked, but if it should have, it didn't, which would mean the instructions in the first post are incomplete.
I'm doing this on my Incredible, so maybe the ROM I'm using is missing something else. I have no idea. I've tried it on three different ICS ROMs and it didn't work on any of them.
When I get a chance, I'll try it with the new aapt.
Sent from my ADR6300 using xda premium
Thanks for that new aapt, it works. It recompiled everything, but the file size is 4mb smaller than the original framework-res.apk. I get nothing but bootloops now. I also compiled with APK Multi Tool which also worked, but with the same results - bootloops.
Would it be possible to enable the soft buttons on a gingerbread ROM?
~=[,,_,,]:3 <----nyancat
Futur Innovations said:
Would it be possible to enable the soft buttons on a gingerbread ROM?
~=[,,_,,]:3 <----nyancat
Click to expand...
Click to collapse
I highly doubt it, enough to confidently say no.
Sent from my GT-P7510 using xda premium

[Q] Cherry-Picking help

I want to cherry-pick "custom notification led settings" from purity to my aosp build.
So I went ahead and picked up these two commits
https://github.com/KitKatPurity/pla...mmit/c85834ed460ec99e0752f1f13e58cad74abf844e
and
https://github.com/KitKatPurity/pla...mmit/b37fdf4238b11b0232b12f218294131ea77ec309
The framework part ran well and there was no conflict. The settings part returned a small conflict which I solved myself. Now as I go on compiling, everything compiled good but then at the time of Settings.apk compiling it returned this error.
Code:
packages/apps/Settings/src/com/android/settings/DisplaySettings.java:119: cannot find symbol
symbol : variable mDisplayManager
location: class com.android.settings.DisplaySettings
mDisplayManager = (DisplayManager)getActivity().getSystemService(
^
packages/apps/Settings/src/com/android/settings/DisplaySettings.java:119: cannot find symbol
symbol : class DisplayManager
location: class com.android.settings.DisplaySettings
mDisplayManager = (DisplayManager)getActivity().getSystemService(
^
packages/apps/Settings/src/com/android/settings/DisplaySettings.java:121: cannot find symbol
symbol : variable mWifiDisplayStatus
location: class com.android.settings.DisplaySettings
mWifiDisplayStatus = mDisplayManager.getWifiDisplayStatus();
^
packages/apps/Settings/src/com/android/settings/DisplaySettings.java:121: cannot find symbol
symbol : variable mDisplayManager
location: class com.android.settings.DisplaySettings
mWifiDisplayStatus = mDisplayManager.getWifiDisplayStatus();
^
packages/apps/Settings/src/com/android/settings/DisplaySettings.java:122: cannot find symbol
symbol : variable mWifiDisplayPreference
location: class com.android.settings.DisplaySettings
mWifiDisplayPreference = (Preference)findPreference(KEY_WIFI_DISPLAY);
^
packages/apps/Settings/src/com/android/settings/DisplaySettings.java:122: cannot find symbol
symbol : variable KEY_WIFI_DISPLAY
location: class com.android.settings.DisplaySettings
mWifiDisplayPreference = (Preference)findPreference(KEY_WIFI_DISPLAY);
^
packages/apps/Settings/src/com/android/settings/DisplaySettings.java:123: cannot find symbol
symbol : variable mWifiDisplayStatus
location: class com.android.settings.DisplaySettings
if (mWifiDisplayStatus.getFeatureState()
^
packages/apps/Settings/src/com/android/settings/DisplaySettings.java:124: cannot find symbol
symbol : variable WifiDisplayStatus
location: class com.android.settings.DisplaySettings
== WifiDisplayStatus.FEATURE_STATE_UNAVAILABLE) {
^
packages/apps/Settings/src/com/android/settings/DisplaySettings.java:125: cannot find symbol
symbol : variable mWifiDisplayPreference
location: class com.android.settings.DisplaySettings
getPreferenceScreen().removePreference(mWifiDisplayPreference);
^
packages/apps/Settings/src/com/android/settings/DisplaySettings.java:126: cannot find symbol
symbol : variable mWifiDisplayPreference
location: class com.android.settings.DisplaySettings
mWifiDisplayPreference = null;
^
packages/apps/Settings/src/com/android/settings/purity/notificationlight/ApplicationLightPreference.java:170: method does not override or implement a method from a supertype
@Override
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
11 errors
make: *** [out/target/common/obj/APPS/Settings_intermediates/classes-full-debug.jar] Error 41
make: *** Waiting for unfinished jobs....
Here are the link of the 2 files where the error is shown:
ApplicationLightPreference.java
DisplaySettings.java
I tried the following combination to solve it:
in ApplicationLightPreference.java, I deleted the line which returned the error.
in DisplaySettings.java I deleted the line which returned the error.
The build compiles fine, boot fines but but when I select display settings, it force closes.
Any help in solving this error is appreciated.
Since this is a question why not post in the section clearly marked for questions??
Sent from my Nexus 4 using xda premium
brajesh.sharma87 said:
I tried the following combination to solve it:
in ApplicationLightPreference.java, I deleted the line which returned the error.
in DisplaySettings.java I deleted the line which returned the error.
The build compiles fine, boot fines but but when I select display settings, it force closes.
Any help in solving this error is appreciated.
Click to expand...
Click to collapse
Find the commit that added the missing variable(s) and method(s)
pull a log for the force close.
MBQ_ said:
Find the commit that added the missing variable(s) and method(s)
pull a log for the force close.
Click to expand...
Click to collapse
Not sure what to do about the first line but here's the log
Code:
I/ActivityManager( 647): Displayed com.android.settings/.Settings: +631ms
I/ActivityManager( 647): START u0 {act=android.intent.action.MAIN cmp=com.android.settings/.SubSettings (has extras)} from pid 9823
D/audio_hw_primary( 170): select_devices: out_snd_device(2: speaker) in_snd_device(0: )
D/ACDB-LOADER( 170): ACDB -> send_afe_cal
D/SubSettings( 9823): Launching fragment com.android.settings.DisplaySettings
D/AndroidRuntime( 9823): Shutting down VM
W/dalvikvm( 9823): threadid=1: thread exiting with uncaught exception (group=0x415adba8)
E/AndroidRuntime( 9823): FATAL EXCEPTION: main
E/AndroidRuntime( 9823): Process: com.android.settings, PID: 9823
E/AndroidRuntime( 9823): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.SubSettings}: java.lang.NullPointerException
E/AndroidRuntime( 9823): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
E/AndroidRuntime( 9823): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
E/AndroidRuntime( 9823): at android.app.ActivityThread.access$800(ActivityThread.java:135)
E/AndroidRuntime( 9823): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
E/AndroidRuntime( 9823): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 9823): at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 9823): at android.app.ActivityThread.main(ActivityThread.java:5017)
E/AndroidRuntime( 9823): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 9823): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 9823): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
E/AndroidRuntime( 9823): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
E/AndroidRuntime( 9823): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 9823): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 9823): at com.android.settings.DisplaySettings.onCreate(DisplaySettings.java:134)
E/AndroidRuntime( 9823): at android.app.Fragment.performCreate(Fragment.java:1678)
E/AndroidRuntime( 9823): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:859)
E/AndroidRuntime( 9823): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1062)
E/AndroidRuntime( 9823): at android.app.BackStackRecord.run(BackStackRecord.java:684)
E/AndroidRuntime( 9823): at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1447)
E/AndroidRuntime( 9823): at android.app.Activity.performStart(Activity.java:5240)
E/AndroidRuntime( 9823): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2168)
E/AndroidRuntime( 9823): ... 11 more
W/ActivityManager( 647): Force finishing activity com.android.settings/.SubSettings
W/ActivityManager( 647): Force finishing activity com.android.settings/.Settings
W/ActivityManager( 647): Activity pause timeout for ActivityRecord{41e72210 u0 com.android.settings/.SubSettings t14 f}
W/Sidekick_LocationOracleImpl( 2543): Best location was null
I/Process ( 9823): Sending signal. PID: 9823 SIG: 9
V/SearchControllerCache( 2543): creating SearchController
W/Sidekick_LocationOracleImpl( 2543): Best location was null
W/GCoreFlp( 8127): No location to return for getLastLocation()
I/ActivityManager( 647): Process com.android.settings (pid 9823) has died.
I/WindowState( 647): WIN DEATH: Window{419b9318 u0 com.android.settings/com.android.settings.Settings}
D/dalvikvm( 2543): GC_FOR_ALLOC freed 1110K, 57% free 5133K/11704K, paused 27ms, total 27ms
I/MicroHotwordRecognitionRunner( 2543): Starting hotword detection.
D/audio_hw_primary( 170): select_devices: out_snd_device(0: ) in_snd_device(34: voice-rec-mic)
E/ACDB-LOADER( 170): Error: ACDB AudProc vol returned = -8
D/dalvikvm( 2543): GC_CONCURRENT freed 6K, 51% free 5756K/11704K, paused 2ms+3ms, total 32ms
I/SearchController( 2543): #onHotwordDetectorStarted
brajesh.sharma87 said:
Not sure what to do about the first line but here's the log
Click to expand...
Click to collapse
Something is wrong in the onCreate method of DisplaySettings.java
Hi, I checked and you miss the declaration in the Android Manifest in the packages_apps_settings. Go and check my Github commits. You do not need the modifcation in the proguard.flags though.
https://github.com/GeyerA/platform_...mmit/347e74714f0c6efa2dbd3ba49b5612e1cc11bf4f
For completeness also check the commits in the frameworks_base
https://github.com/GeyerA/platform_frameworks_base/commit/a77810164cb1bcb1d449f603f31a97939d9f9b3b
Also, make sure you got these...
https://github.com/PSX-PureSpeed/an...mmit/3e29b10a377f0985ee221aaa4fe10838733ed3df
https://github.com/PSX-PureSpeed/an...mmit/2ae7fbb6134f6831fba8184d0dd1092f5bee1f7a
This should fix your issues, just let me know or PM me as I am not always checking on your thread.
Nice week to everbody. Calo
GeyerA said:
Hi, I checked and you miss the declaration in the Android Manifest in the packages_apps_settings. Go and check my Github commits. You do not need the modifcation in the proguard.flags though.
https://github.com/GeyerA/platform_...mmit/347e74714f0c6efa2dbd3ba49b5612e1cc11bf4f
For completeness also check the commits in the frameworks_base
https://github.com/GeyerA/platform_frameworks_base/commit/a77810164cb1bcb1d449f603f31a97939d9f9b3b
Also, make sure you got these...
https://github.com/PSX-PureSpeed/an...mmit/3e29b10a377f0985ee221aaa4fe10838733ed3df
https://github.com/PSX-PureSpeed/an...mmit/2ae7fbb6134f6831fba8184d0dd1092f5bee1f7a
This should fix your issues, just let me know or PM me as I am not always checking on your thread.
Nice week to everbody. Calo
Click to expand...
Click to collapse
Thanks for the answer. I discarded all the commits which I took from purity.
Started fresh and picked up the commits from your github. There was 1 conflict in DisplaySettings.java, I solved it and compiled. It then gave me error during compile about volume wake. I deleted those lines in question and compiled again. It compiled fine but after installing the output rom I still got FC when clicking on "Display Settings".
I didn't give up. I discarded all the previous commits again and this time picked up the volume wake commits first and then the LED customization commits and then from PSX commits which you advised. Everything ran well, there was not a single conflict this time. Even there was no error at the time of compilation. BUT as always on installing the rom I got the same FC on clicking Display settings.
Now I have deleted the entire out directory and this time will build fresh lets see if that can help, but for that I can only do it after 8-10 days as I am going out of station.
Thanks for all the help.
brajesh.sharma87 said:
Thanks for the answer. I discarded all the commits which I took from purity.
Started fresh and picked up the commits from your github. There was 1 conflict in DisplaySettings.java, I solved it and compiled. It then gave me error during compile about volume wake. I deleted those lines in question and compiled again. It compiled fine but after installing the output rom I still got FC when clicking on "Display Settings".
I didn't give up. I discarded all the previous commits again and this time picked up the volume wake commits first and then the LED customization commits and then from PSX commits which you advised. Everything ran well, there was not a single conflict this time. Even there was no error at the time of compilation. BUT as always on installing the rom I got the same FC on clicking Display settings.
Now I have deleted the entire out directory and this time will build fresh lets see if that can help, but for that I can only do it after 8-10 days as I am going out of station.
Thanks for all the help.
Click to expand...
Click to collapse
Hello, good that you have some progress although you might feel disappointed that it does not work. Here is one reason why I personally do not cherry-pick complex commits as it will also add the lines which are not part of that commit but part of my code.
Anyhow, I believe you missed one small thing which is in android_device_hammerhead. Sorry I forgot that one.
https://github.com/KitKatPurity/pla...mmit/217378d3e6a7a5370e7c1583fcfb4ae1e7a9ac7c
Especially this one in overlay/frameworks/base/core/res/res/values/config.xml
Code:
+ <!-- Is the battery LED intrusive? Used to decide if there should be a disable option -->
+ <bool name="config_intrusiveBatteryLed">true</bool>
+
+ <!-- Does the battery LED support multiple colors? Used to decide if the user can change the colors -->
+ <bool name="config_multiColorBatteryLed">true</bool>
+
I am sure it will work then. Please do not delete everything again when something does not work, post the question first :silly:
GeyerA said:
........I am sure it will work then. Please do not delete everything again when something does not work, post the question first :silly:
Click to expand...
Click to collapse
Thanks but as i said, i wont have access to my laptop for next 8-10 days, will continue once i come back.
Sent from my Nexus 4 using Tapatalk
@GeyerA you're a genius. I've been working on this for last 1 month and finally succeeded.
As I didnt have access to my laptop and the resolution that u you gave was also possible through apk tool, I sent the framework-res.apk to a friend and asked him to just change those two values to 'true' he did so and sent the same to me and boom it worked. Thank you so very much.
Sent from my Nexus 4 using Tapatalk
Hello. I am happy to hear; great satisfaction that I could help. But the credit is Dario's from Kitkatpurity and Martin_Ro's from PSX. They helped me a lot and I suffered much more than you. No biggie but please use the thanks button ....
Sent from my AOSP on HammerHead using xda app-developers app

[PORT][CM11] Xperia Z2 Sirius Smart Social Camera

Hello Friends I Ported Xperia Z2 Smart Social Camera Including Latest AR Effect,Background Defocus,Info Eye,Social live,Vine,Motionshot,Motiongraph For Xperia,Wikitude Places,Voice Balloon Photo,AR Effect For Line,V1 Sports For Sony Xperia Phones Running CM11 Kitkat Like Xperia M,SP,TX,V,L etc. I Hope Everyone Like & Enjoy It.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Features
AR Effect
Switch your camera to AR Effect mode and add fun animations to your photos and videos. Ranging from dinosaurs to ocean-life, these fully customisable themes can be easily edited.
Background Defocus
Create a blurred out background or foreground. Background Defocus simulates a shallow depth of field, capturing two image planes at different focus settings and allowing you to merge the different depths.
Info-eye™
Photograph an object and Info-eye™ will instantly give you all the relevant information you need, right through your camera viewfinder.
Social live
With Social live, you can broadcast every precious moment as it happens live via Facebook. Get your friends’ responses right on the screen and keep the conversation going all in real time.
Vine
Vine is the best way to see and share life in motion. Create short, beautiful, looping videos in a simple and fun way for your friends and family to see.
Motion Shot
This app allows you to capture a short movie by automatically rendering the movement into a single still image so that it appears to be a continuous picture. It is perfect for creating animated images with unique expressions in action scenes involving sports, animals, kids, friends, vehicles, airplanes and moving objects.
Motiongraph for Xperia™
Motiongraph for Xperia™ is a smartphone application that creates unusual images in which part of the image moves like a video.
Amaze your friends with these unique images that are limited only by your imagination.
Motiongraph for Xperia™ allows you to create your image in three simple and intuitive steps:
1. Shoot: Tap a button to record a video about 2 seconds in length.
2. Edit : Swipe across the screen to define the areas that you want it to move or not to move.
3. Save : Tap a button again to save your work, and you're done!
Instructions & Download Link Is On 2nd Post
Screenshots On 3rd Post
Credits
Thanks To macallen For XperiaZ2 FTF
Cheers U Can Post Screenshots Too & I'll Add To This Thread
If U Like My Work Dont Forgot To Press Thanks Button
XDA:DevDB Information
[PORT][CM11] Xperia Z2 Sirius Smart Social Camera, App for the Sony Xperia M
Contributors
xperiaz2
Version Information
Status: Stable
Current Stable Version: Final
Stable Release Date: 2014-04-28
Created 2014-04-28
Last Updated 2014-05-08
Installing Instruction For Any Cm11 Android
1.Download Z2SocialCamera4.zip flash via cwm
2.Download Z2 Camera Addons & Latest AR Effect 3.0.27 Install All apk Normally
3. Run Background Defocus Or Add Widget Camera Choose ur Fav. Camera Addons & Run
Here U Can Download Xperia Z2 Smart Social Camera
https://www.mediafire.com/?2ojpj2tjx853jkz
New Version Here Works On Many Android Phones
https://www.mediafire.com/?kkmapv7682kkkjs
Flash via CWM
Xperia Z2 Camera Addons
http://www.mediafire.com/download/a73e7otni7ap771/Z2CameraAddons.zip
Extract Zip Install All apk Normally
Latest AR Effect 3.0.27 With All Themes Like Spider-Man,Horror etc.
https://www.mediafire.com/?xd1453p1485sedv
AR Effect 2.0.8
https://www.mediafire.com/?8plt36ov6vptyz4
Install apk Normally.. :good:
Screenshots
Good Job Man....!!!!
Wow...youre suprising everyone bro
Thanks for this, I'll try this on my couzins xperia phone :good:
Btw bro, is it possible to port this to other devices running CM11?
totzkitotz said:
Wow...youre suprising everyone bro
Thanks for this, I'll try this on my couzins xperia phone :good:
Btw bro, is it possible to port this to other devices running CM11?
Click to expand...
Click to collapse
Yeah Pleasure Bro yup this works on other devices running cm11 too :good:
xperiaz2 said:
Yeah Pleasure Bro yup this works on other devices running cm11 too :good:
Click to expand...
Click to collapse
wow going to give it a try bro...ill feedback later, because I have an htc here running CM11 thats why Im also asking it..thanks again bro keep it up
cm11 where?
yeeson said:
cm11 where?
Click to expand...
Click to collapse
In the OP sir CM11 kitkat running devices :good:
totzkitotz said:
In the OP sir CM11 kitkat running devices :good:
Click to expand...
Click to collapse
Xperia Z2 cm11 where?
Great Job:good:
Levered said:
Great Job:good:
Click to expand...
Click to collapse
yeah thnx bro :good: Enjoy it
xperiaz2 said:
yeah thnx bro :good: Enjoy it
Click to expand...
Click to collapse
Btw CM11 many bugs....
Great work lokking forward to try this.
Is this works on aosp rom?
I m using carbon rom 4.4
Sent from my C5303 using Tapatalk
This is i want, thanks bro!
wow!! ive awaited this for so loooooooooong. i cannot believe its here!
im downloading now, thank you!! i will bug report soon as i can
Work for Xperia P AOSP 4.4.2? It is novathor and as Z1 camera did not work for novathor, there may be a chance that it may nit work...
Sent my AOSP Xperia P
Force Close!
The camera application force closes in AOSPA 4.2.2 Xperia L.
Hope in future it works!!!
@xperiaz2 Nice job. For xperia P with cm11 i have a force close.Could please add libmmjpeg_interface.so lib to test it ?
dlopen("/system/lib/libimageprocessorjni.so") failed: dlopen failed: could not load library "libcacao_common.so" needed by "libimageprocessorjni.so"; caused by could not load library "libcammw.so" needed by "libcacao_common.so"; caused by could not load library "libmmjpeg_interface.so" needed by "libcammw.so"; caused by library "libmmjpeg_interface.so" not found
Click to expand...
Click to collapse
And here's a part of a logcat:
Code:
E/dalvikvm( 4903):dlopen("/system/lib/libimageprocessorjni.so") failed: dlopen failed: could not load library "libcacao_common.so" needed by "libimageprocessorjni.so"; caused by could not load library "libcammw.so" needed by "libcacao_common.so"; caused by could not load library "libmmjpeg_interface.so" needed by "libcammw.so"; caused by library "libmmjpeg_interface.so" not found
W/dalvikvm( 4903): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/sonymobile/imageprocessor/superresolution/SuperResolutionProcessor;
I/dalvikvm( 4903): Could not find method android.os.storage.StorageManager$StorageType.name, referenced from method com.sonyericsson.cameracommon.mediasaving.CameraStorageManager.getPathFromConfig
W/dalvikvm( 4903): VFY: unable to resolve virtual method 590: Landroid/os/storage/StorageManager$StorageType;.name ()Ljava/lang/String;
D/dalvikvm( 4903): VFY: replacing opcode 0x6e at 0x0024
I/dalvikvm( 4903): Could not find method android.os.storage.StorageManager.getVolumePath, referenced from method com.sonyericsson.cameracommon.mediasaving.CameraStorageManager.getPathFromType
W/dalvikvm( 4903): VFY: unable to resolve virtual method 592: Landroid/os/storage/StorageManager;.getVolumePath (Landroid/os/storage/StorageManager$StorageType;)Ljava/lang/String;
D/dalvikvm( 4903): VFY: replacing opcode 0x6e at 0x0004
W/dalvikvm( 4903): VFY: unable to resolve static field 82 (UNKNOWN) in Landroid/os/storage/StorageManager$StorageType;
D/dalvikvm( 4903): VFY: replacing opcode 0x62 at 0x0000
W/dalvikvm( 4903): VFY: unable to resolve static field 81 (INTERNAL) in Landroid/os/storage/StorageManager$StorageType;
D/dalvikvm( 4903): VFY: replacing opcode 0x62 at 0x000b
W/dalvikvm( 4903): VFY: unable to resolve static field 80 (EXTERNAL_CARD) in Landroid/os/storage/StorageManager$StorageType;
D/dalvikvm( 4903): VFY: replacing opcode 0x62 at 0x000e
W/dalvikvm( 4903): VFY: unable to resolve static field 80 (EXTERNAL_CARD) in Landroid/os/storage/StorageManager$StorageType;
D/dalvikvm( 4903): VFY: replacing opcode 0x62 at 0x0006
W/dalvikvm( 4903): VFY: unable to resolve static field 81 (INTERNAL) in Landroid/os/storage/StorageManager$StorageType;
D/dalvikvm( 4903): VFY: replacing opcode 0x62 at 0x000c
I/dalvikvm( 4903): Could not find method android.os.storage.StorageManager.getVolumeType, referenced from method com.sonyericsson.cameracommon.settings.SaveDestination.getOptions
W/dalvikvm( 4903): VFY: unable to resolve virtual method 594: Landroid/os/storage/StorageManager;.getVolumeType (Ljava/lang/String;)Landroid/os/storage/StorageManager$StorageType;
D/dalvikvm( 4903): VFY: replacing opcode 0x6e at 0x001e
I/dalvikvm( 4903): DexOpt: unable to optimize static field ref 0x0050 at 0x1b in Lcom/sonyericsson/cameracommon/settings/SaveDestination;.<clinit>
W/dalvikvm( 4903): Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lcom/sonyericsson/cameracommon/settings/SaveDestination;
W/dalvikvm( 4903): Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lcom/sonyericsson/cameracommon/mediasaving/CameraStorageManager$1;
D/AndroidRuntime( 4903): Shutting down VM
W/dalvikvm( 4903): threadid=1: thread exiting with uncaught exception (group=0x41916c80)
E/AndroidRuntime( 4903): FATAL EXCEPTION: main
E/AndroidRuntime( 4903): Process: com.sonyericsson.android.camera, PID: 4903
E/AndroidRuntime( 4903): java.lang.NoClassDefFoundError: android.os.storage.StorageManager$StorageType
E/AndroidRuntime( 4903): at com.sonyericsson.cameracommon.settings.SaveDestination.<clinit>(SaveDestination.java:28)
E/AndroidRuntime( 4903): at com.sonyericsson.cameracommon.mediasaving.CameraStorageManager$1.<clinit>(CameraStorageManager.java:900)
E/AndroidRuntime( 4903): at com.sonyericsson.cameracommon.mediasaving.CameraStorageManager.showOrClearStorageErrorPopup(CameraStorageManager.java:375)
E/AndroidRuntime( 4903): at com.sonyericsson.cameracommon.mediasaving.CameraStorageManager.setLastStorageState(CameraStorageManager.java:344)
E/AndroidRuntime( 4903): at com.sonyericsson.cameracommon.mediasaving.CameraStorageManager.updateStorageState(CameraStorageManager.java:322)
E/AndroidRuntime( 4903): at com.sonyericsson.cameracommon.mediasaving.CameraStorageManager.<init>(CameraStorageManager.java:202)
E/AndroidRuntime( 4903): at com.sonyericsson.cameracommon.activity.BaseActivity.onCreate(BaseActivity.java:250)
E/AndroidRuntime( 4903): at com.sonyericsson.android.camera.ExtendedActivity.onCreate(ExtendedActivity.java:273)
E/AndroidRuntime( 4903): at com.sonyericsson.android.camera.CameraActivity.onCreate(CameraActivity.java:226)
E/AndroidRuntime( 4903): at android.app.Activity.performCreate(Activity.java:5231)
E/AndroidRuntime( 4903): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
E/AndroidRuntime( 4903): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2169)
E/AndroidRuntime( 4903): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2265)
E/AndroidRuntime( 4903): at android.app.ActivityThread.access$800(ActivityThread.java:145)
E/AndroidRuntime( 4903): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1206)
E/AndroidRuntime( 4903): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 4903): at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 4903): at android.app.ActivityThread.main(ActivityThread.java:5081)
E/AndroidRuntime( 4903): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 4903): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 4903): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:781)
E/AndroidRuntime( 4903): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime( 4903): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 2135): Force finishing activity com.sonyericsson.android.camera/.CameraActivity
I/libblt_hw( 1533): Library closed (handle = 8, fd = 54)
I/ActivityManager( 2135): Config changes=480 {1.0 202mcc1mnc en_US ldltr sw360dp w360dp h614dp 240dpi nrml long port finger -keyb/v/h -nav/h s.20 themeResource=null}
D/PhoneStatusBar( 2378): mSettingsPanelGravity = 55
I/InputReader( 2135): Reconfiguring input devices. changes=0x00000004
I/InputReader( 2135): Device reconfigured: id=1, name='sensor00.f11_sensor0', size 540x960, orientation 0, mode 1, display id 0
I/InputReader( 2135): Reconfiguring input devices. changes=0x00000004
I/libblt_hw( 1533): Library opened (handle = 5, fd = 54)
D/Tethering( 2135): Exception adding default nw to upstreamIfaceTypes: java.lang.NullPointerException
D/Tethering( 2135): Exception adding default nw to upstreamIfaceTypes: java.lang.NullPointerException
I/WindowManager( 2135): Screen frozen for +860ms due to Window{41f19120 u0 StatusBar}
E/STE-HWComposer( 1533): bufferIsHWMEM: Buffer handle is NULL!
E/gralloc ( 1533): [User error] handle_2_hwmem_gralloc_handle: Invalid handle
I/libblt_hw( 1533): Library opened (handle = 8, fd = 43)
I/libblt_hw( 1533): Library opened (handle = 10, fd = 53)
I/libblt_hw( 1533): Library opened (handle = 11, fd = 57)
I/libblt_hw( 1533): Library opened (handle = 12, fd = 58)
E/STE-HWComposer( 1533): bufferIsHWMEM: Buffer handle is NULL!
E/gralloc ( 1533): [User error] handle_2_hwmem_gralloc_handle: Invalid handle
E/STE-HWComposer( 1533): bufferIsHWMEM: Buffer handle is NULL!
E/gralloc ( 1533): [User error] handle_2_hwmem_gralloc_handle: Invalid handle
E/STE-HWComposer( 1533): bufferIsHWMEM: Buffer handle is NULL!
E/gralloc ( 1533): [User error] handle_2_hwmem_gralloc_handle: Invalid handle
E/STE-HWComposer( 1533): bufferIsHWMEM: Buffer handle is NULL!
E/gralloc ( 1533): [User error] handle_2_hwmem_gralloc_handle: Invalid handle
E/STE-HWComposer( 1533): bufferIsHWMEM: Buffer handle is NULL!
I may have been dumb in trying this, but it's not working with my Xperia ZL running Omni 4.4.2. I don't know if I can help much by attaching the log but here goes. Searching for "sonymobile", "sonyericsson" or "camera" may help (?)

[Q] CM11 HWA Settings FC

Hi xda,
I've been reading the defy section for quite a while now, and love whats happening to the Defy! Thanks to everyone involved.
I have a problem with the HWA Settings, whenever I open them and whatever I do (scroll or uncheck an app), I get a forced closed notification. I am really running low on RAM and would love to disable HWA for a couple of apps, but am unable to do so.
Has anyone experienced a similar behaviour in the past and can recommend a procedure?
I am currently on 20140610, same problem occured to me with 20140518.
Thanks for all hints. If this is a yet unknown behaviour, I'll see if I can get any useful logs.
Cheers
Have you done a clean install means wiped data, cache and dalvik before install the new ROM? Because of I dont have such problems with the newest CM11 ROMs. At the other hand you could try to disable hwa for some apps with the terminal app. I can remember vaguely such a command exists but I dont know the precise writing anymore, sorry. Maybe someone with more profound knowledge can help you out.
Thank you for the hint.
Just in case anyone else is facing this issue and looking for a manual workaround, just create empty files inside /data/local/hwui.deny/ and fix the permissions (likely chown system:system and chmod 600).
e.g.
Code:
cd /data/local/hwui.deny/
touch com.android.browser
chmod 600 *
chown system:system *
My system has beed dirty flashed ever since I started using CM 10.2, I actually do not want to try a clean install now, for this minor issue.
The error that I see in logcat is:
Code:
D/AndroidRuntime( 8960): Shutting down VM
W/dalvikvm( 8960): threadid=1: thread exiting with uncaught exception (group=0x415a4ce0)
E/AndroidRuntime( 8960): FATAL EXCEPTION: main
E/AndroidRuntime( 8960): Process: com.cyanogenmod.settings.device.hwa, PID: 8960
E/AndroidRuntime( 8960): java.lang.ClassCastException: android.text.SpannableString cannot be cast to java.lang.String
E/AndroidRuntime( 8960): at com.cyanogenmod.settings.device.hwa.PackageListFragment.onItemClick(PackageListFragment.java:191)
E/AndroidRuntime( 8960): at android.widget.AdapterView.performItemClick(AdapterView.java:298)
E/AndroidRuntime( 8960): at android.widget.AbsListView.performItemClick(AbsListView.java:1113)
E/AndroidRuntime( 8960): at android.widget.AbsListView$PerformClick.run(AbsListView.java:2911)
E/AndroidRuntime( 8960): at android.widget.AbsListView$3.run(AbsListView.java:3645)
E/AndroidRuntime( 8960): at android.os.Handler.handleCallback(Handler.java:733)
E/AndroidRuntime( 8960): at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime( 8960): at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 8960): at android.app.ActivityThread.main(ActivityThread.java:5161)
E/AndroidRuntime( 8960): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 8960): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 8960): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
E/AndroidRuntime( 8960): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:611)
E/AndroidRuntime( 8960): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 1618): Force finishing activity com.cyanogenmod.settings.device.hwa/.HwaSettingsActivity
W/ActivityManager( 1618): Activity pause timeout for ActivityRecord{41fdfdc0 u0 com.cyanogenmod.settings.device.hwa/.HwaSettingsActivity t12 f}
I/Timeline( 1893): Timeline: Activity_idle id: [email protected] time:3048164
I/Timeline( 1618): Timeline: Activity_windows_visible id: ActivityRecord{4220a3d0 u0 com.teslacoilsw.launcher/com.android.launcher2.Launcher t1} time:3048618
I/Process ( 8960): Sending signal. PID: 8960 SIG: 9
I/ActivityManager( 1618): Process com.cyanogenmod.settings.device.hwa (pid 8960) has died.
I/WindowState( 1618): WIN DEATH: Window{421c25b0 u0 com.cyanogenmod.settings.device.hwa/com.cyanogenmod.settings.device.hwa.HwaSettingsActivity}
If it is just me, I'll leave it for now, if the problem arises for other users aswell, I'll try to find the upstream code and and hunt the issue down.
HWA Stopped Working
I've tried all sorts of things here.
I note that the folder hwui.deny to which madmuffin refers has no files at all.
I've deleted associated HWA Settings data via app settings.
This error persists in spite of my flashing a new ROM update today.:silly:
@gbossley The folder was empty on my side as well.
Since I manually created these files I havent used HWA Settings, but when I wanted to show the problem to a friend this weekend, HWA Settings worked flawless.
madmuffin said:
@gbossley The folder was empty on my side as well.
Since I manually created these files I havent used HWA Settings, but when I wanted to show the problem to a friend this weekend, HWA Settings worked flawless.
Click to expand...
Click to collapse
Could I trouble you for a file please - exactly as you've loaded into the folder? I'll PM you.
gbossley said:
Could I trouble you for a file please - exactly as you've loaded into the folder? I'll PM you.
Click to expand...
Click to collapse
The files are completely empty. If you use a Unix-like O/S like Linux, you can use the touch command on the prompt. Or you can just create an empty textfile using any method you like.
I did not upload the files from anywhere, I created them on the device.
Side note: I believe that it doesn't even matter. They might as well contain something. I believe the system only reads the list of files from that folder and processes that list. It won't check the contents or open the files.
Progress!
Thanks to Madmuffin, and a bit of tenacity (?), I see progress.
When looking at HWA Settings, under each app the file name to be managed is shown.
EG. for Aero Control, the file name will be com.aero.control
For ASR (a voice-recorder app) the file name is com.nll.asr
I used ROM Toolbox because with it you can use ROM Browser, navigate to the folder /data/local/hwui.deny/ and press New to create a new blank file with the appropriate names (as for Aero Control or ASR examples above).
So I created three blank files for three of the apps that I want to turn acceleration off for.
Now HWA shows those three files as deselected! However, it still stops working after either trying to turn them back on or turn others off.
So it looks as though I need to create a new blank file for every app that I want to turn off acceleration for.
My only question is "if the app is deselected per the above process, is acceleration actually turned off?" How could I test?
As Advised by Madmuffin, HWA Settings has started working! I'd love to know what logic goes on there...
HWA Not Working (Again)
I upgraded my ROM - TO Quarx CM11 (0607). HWA now not working again.
The HWUI.Deny folder has a heap of blank files in it.
Ideas?
gbossley said:
I upgraded my ROM - TO Quarx CM11 (0607). HWA now not working again.
Click to expand...
Click to collapse
Is the HWA Settings app not working or is hardware acceleration not disabled for the apps previously deselected?
gbossley said:
The HWUI.Deny folder has a heap of blank files in it.
Click to expand...
Click to collapse
What do you mean by "blank files"? The files in the folder are empty files by design and need no content.
madmuffin said:
Is the HWA Settings app not working or is hardware acceleration not disabled for the apps previously deselected?
What do you mean by "blank files"? The files in the folder are empty files by design and need no content.
Click to expand...
Click to collapse
Sorry, I could have been more specific.
The EMPTY files are there. If I try to make any changes "Unfortunately, Hwa Settings has stopped".
220
gbossley said:
Sorry, I could have been more specific.
The EMPTY files are there. If I try to make any changes "Unfortunately, Hwa Settings has stopped".
Click to expand...
Click to collapse
Well thats the previously observed behaviour of the HWA Settings App. I guess it will start to work after a while again, just like it did before. Since I do not need to make any changes, I usually don't even open up the app.
This seems to be a bug in HWA Settings App, but to be honest, I do not really care to much.
madmuffin said:
Code:
E/AndroidRuntime( 8960): Process: com.cyanogenmod.settings.device.hwa, PID: 8960
E/AndroidRuntime( 8960): java.lang.ClassCastException: android.text.SpannableString cannot be cast to java.lang.String
E/AndroidRuntime( 8960): at com.cyanogenmod.settings.device.hwa.PackageListFragment.onItemClick(PackageListFragment.java:191)
Click to expand...
Click to collapse
Hi,
when searching for this error message I found this:
http://stackoverflow.com/questions/11041973/why-cant-i-pass-data-via-intent
It was because getText() needs to have a 'toString()' at the end. Without this 'toString()', it will crash on Android 4.x, but will work on Android 2.x.
Click to expand...
Click to collapse
According to answer #4 this should help, the patch is _not_ compile-tested:
Code:
--- a/packages/apps/HwaSettings/src/com/cyanogenmod/settings/device/hwa/PackageListFragment.java 2014-05-25 14:34:36.115629433 +0200
+++ b/packages/apps/HwaSettings/src/com/cyanogenmod/settings/device/hwa/PackageListFragment.java 2014-07-21 18:44:53.271472949 +0200
@@ -189,7 +189,7 @@
.findViewById(R.id.hwa_settings_enabled);
boolean enableHwa = !hwaCheck.isChecked();
String packageName = (String) ((TextView) view
- .findViewById(R.id.hwa_settings_packagename)).getText();
+ .findViewById(R.id.hwa_settings_packagename)).getText().toString();
Intent service = new Intent(mContext, HwaSettingsService.class);
service.putExtra(PackageListProvider.PACKAGE_NAME, packageName);
service.putExtra(PackageListProvider.HWA_ENABLED, enableHwa);
sevenrock said:
Hi,
when searching for this error message I found this:
http://stackoverflow.com/questions/11041973/why-cant-i-pass-data-via-intent
According to answer #4 this should help, the patch is _not_ compile-tested:
Code:
--- a/packages/apps/HwaSettings/src/com/cyanogenmod/settings/device/hwa/PackageListFragment.java 2014-05-25 14:34:36.115629433 +0200
+++ b/packages/apps/HwaSettings/src/com/cyanogenmod/settings/device/hwa/PackageListFragment.java 2014-07-21 18:44:53.271472949 +0200
@@ -189,7 +189,7 @@
.findViewById(R.id.hwa_settings_enabled);
boolean enableHwa = !hwaCheck.isChecked();
String packageName = (String) ((TextView) view
- .findViewById(R.id.hwa_settings_packagename)).getText();
+ .findViewById(R.id.hwa_settings_packagename)).getText().toString();
Intent service = new Intent(mContext, HwaSettingsService.class);
service.putExtra(PackageListProvider.PACKAGE_NAME, packageName);
service.putExtra(PackageListProvider.HWA_ENABLED, enableHwa);
Click to expand...
Click to collapse
Sevenrock if you posted this to assist me in some way thanks. However, I'm an ignoramus! How do I use this information? I haven't the faintest clue!:silly:

Problem trying to get the camera function and selecting a image from gallery to work?

Hi still new to android, tried the following tutorial in the youtube link here https://www.youtube.com/watch?v=4LCnoVqQ6N4 but I couldn't get the app to work as I am unable to execute the camera on my physical phone where it kept giving me this popup "Something went Wrong while taking photos" when I press the camera imageview. And when I am at the gallery choosing a photo it will cause the app to suddenly stop.
Thus, I downloaded the author's source code here https://drive.google.com/file/d/0B2rvGRbu0A83cjBBZElhdGp5OHM/view but i also encounter the same issues stated above.
Tried adding the permission for camera,read,write external storage in the androidmanifest without any luck of solving it.
Error Log after i click on a image in the gallery:
Code:
08-17 12:21:08.181 17286-17286/com.example.user.cameratoserver E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.user.cameratoserver, PID: 17286
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=400, result=-1, data=Intent { dat=content://com.android.providers.media.documents/document/image:104460 flg=0x1 }} to activity {com.example.user.cameratoserver/com.example.user.cameratoserver.MainActivity}: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=17286, uid=10038 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
at android.app.ActivityThread.deliverResults(ActivityThread.java:3798)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:3841)
at android.app.ActivityThread.access$1400(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1440)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:234)
at android.app.ActivityThread.main(ActivityThread.java:5526)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=17286, uid=10038 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
at android.os.Parcel.readException(Parcel.java:1627)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
at android.content.ContentProviderProxy.query(ContentProviderNative.java:427)
at android.content.ContentResolver.query(ContentResolver.java:497)
at android.content.ContentResolver.query(ContentResolver.java:439)
at com.kosalgeek.android.photoutil.RealPathUtil.getDataColumn(RealPathUtil.java:131)
at com.kosalgeek.android.photoutil.RealPathUtil.getRealPathFromURI_API19(RealPathUtil.java:62)
at com.kosalgeek.android.photoutil.GalleryPhoto.getPath(GalleryPhoto.java:49)
at com.example.user.cameratoserver.MainActivity.onActivityResult(MainActivity.java:100)
at android.app.Activity.dispatchActivityResult(Activity.java:6490)
at android.app.ActivityThread.deliverResults(ActivityThread.java:3794)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:3841)
at android.app.ActivityThread.access$1400(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1440)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:234)
at android.app.ActivityThread.main(ActivityThread.java:5526)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
if you are testing on a device running android marshmallow and above you should also write code to request the android.permission.READ_EXTERNAL_STORAGE permission at runtime.
Take a look at the following link for android developers https://developer.android.com/training/permissions/requesting.html
nemoc 23 said:
if you are testing on a device running android marshmallow and above you should also write code to request the android.permission.READ_EXTERNAL_STORAGE permission at runtime.
Take a look at the following link for android developers https://developer.android.com/training/permissions/requesting.html
Click to expand...
Click to collapse
Oh i see but I've read the documentation but still at a lost as to how to implement the codes from the documentation into the source code in the link above, as this is my first android development experience was feeling rather lost.
imso said:
Oh i see but I've read the documentation but still at a lost as to how to implement the codes from the documentation into the source code in the link above, as this is my first android development experience was feeling rather lost.
Click to expand...
Click to collapse
If you are below MM you just need to add the permission to the manifest.
Code:
<manifest>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
</manifest>
If you are on MM or higher you need to add the permission the manifest and then ask for it at runtime.
Code:
if (ContextCompat.checkSelfPermission(activity, Manifest.permission.READ_CONTACTS) != PackageManager.READ_EXTERNAL_STORAGE) {
ActivityCompat.requestPermissions(thisActivity, new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, CALLBACK_ID);
}
You will also need to handle the result of that on your activity:
Code:
@Override public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {
if (requestCode == CALLBACK_ID) {
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
// Granted
} else {
// Not granted
}
}
}

Categories

Resources