[Q] Cherry-Picking help - Nexus 4 Q&A, Help & Troubleshooting

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

Related

[CODE][Q] Pass extra twice(image to mms), or use lastIndexOf() to get file?

Ok so this may get sort of complicated, but I'll try to explain it simply.
I have a mainActivity(viewpager). i take a screenshot of this from ABS options menu. This gets saved to sdcard . WORKS FINE
Code:
this is selecting from the actionbar menu
else if (item.getTitle().toString().equalsIgnoreCase("Take Screengrab")) {
View v1 = R1.getRootView();
v1.setDrawingCacheEnabled(true);
Bitmap bm = v1.getDrawingCache();
Util.saveBitmap(bm, "folder", "screenshot");
//the above are the folder I chose to name, and the screenshotname{without additional numbering}
BitmapDrawable bitmapDrawable = new BitmapDrawable(bm);
image = (ImageView) findViewById(R.id.image4);
//imageview is above. second ativity is below
Intent intent = new Intent(this, Screenshots.class);
intent.putExtra("image", bm);
//"image" is my extra
startActivity(intent);
I send that while its saving, to an ImageView in a second(normal) activity. WORKS FINE
Code:
[user=439709]@override[/user]
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.screenshots);
//The ImageView where the screenshot goes
ImageView image=(ImageView)findViewById(R.id.image4);
//This "imageId" isnt used, but for some reason the Imageview wont set without it
Intent intent = getIntent();
int imageId = intent.getIntExtra("imageId", -1); // -1 would be a default value//
//this gets my extra
Bitmap bm = (Bitmap)this.getIntent().getParcelableExtra("image");
image.setImageBitmap(bm);
I have a button to share it, it opens with picture attached. SORT OF WORKING
The thing is, I want to automatically pass this same extra Bitmap and attach it to the message.
i can open a message with a known file attached.
Code:
{
Uri smsUri = Uri.parse("tel:0000000");
Intent intent = new Intent(Intent.ACTION_SEND, smsUri);
intent.setType("image/*");
intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file:///sdcard/folder/screenshot.png"));
intent.putExtra(Intent.EXTRA_TEXT,"Today");
startActivity(intent);
i tried the working in putExtra to the message, but I get a toast from the messaging app "Sorry, cannot attach this image". NO STACK ERRORS. nothign in the logs I can use.
Code:
Uri smsUri = Uri.parse("tel:0000000");
Intent intent = new Intent(Intent.ACTION_SEND, smsUri);
intent.setType("image/*");
intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("image"));
intent.putExtra(Intent.EXTRA_TEXT,"Today");
startActivity(intent);
and other stuff like that that.
I currently am loading a known file into the message and it works perfect. Problem is, I wont know the name of the file, because my screenshots get saved as image1, image2, etc. So it will be different in every case.
So im wondering if its even possible to pass and extra through twice like that, or if I should look into return the latest image in that sdcard folder with like lastIndexOf(), or something similar.
basically, is there a way to simply query find and attach the highest numbered file? without a GUI(i can do select from gallery, but am trying to make it more automated).
any thoughts would be appreciated.
P.S. i know about the lint errors and things, and somewhat sloppy self taught java, but its working. only worried about the image passing.
out of ideas said:
Ok so this may get sort of complicated, but I'll try to explain it simply.
I have a mainActivity(viewpager). i take a screenshot of this from ABS options menu. This gets saved to sdcard . WORKS FINE
Code:
this is selecting from the actionbar menu
else if (item.getTitle().toString().equalsIgnoreCase("Take Screengrab")) {
View v1 = R1.getRootView();
v1.setDrawingCacheEnabled(true);
Bitmap bm = v1.getDrawingCache();
Util.saveBitmap(bm, "folder", "screenshot");
//the above are the folder I chose to name, and the screenshotname{without additional numbering}
BitmapDrawable bitmapDrawable = new BitmapDrawable(bm);
image = (ImageView) findViewById(R.id.image4);
//imageview is above. second ativity is below
Intent intent = new Intent(this, Screenshots.class);
intent.putExtra("image", bm);
//"image" is my extra
startActivity(intent);
I send that while its saving, to an ImageView in a second(normal) activity. WORKS FINE
Code:
[user=439709]@override[/user]
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.screenshots);
//The ImageView where the screenshot goes
ImageView image=(ImageView)findViewById(R.id.image4);
//This "imageId" isnt used, but for some reason the Imageview wont set without it
Intent intent = getIntent();
int imageId = intent.getIntExtra("imageId", -1); // -1 would be a default value//
//this gets my extra
Bitmap bm = (Bitmap)this.getIntent().getParcelableExtra("image");
image.setImageBitmap(bm);
I have a button to share it, it opens with picture attached. SORT OF WORKING
The thing is, I want to automatically pass this same extra Bitmap and attach it to the message.
i can open a message with a known file attached.
Code:
{
Uri smsUri = Uri.parse("tel:0000000");
Intent intent = new Intent(Intent.ACTION_SEND, smsUri);
intent.setType("image/*");
intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file:///sdcard/folder/screenshot.png"));
intent.putExtra(Intent.EXTRA_TEXT,"Today");
startActivity(intent);
i tried the working in putExtra to the message, but I get a toast from the messaging app "Sorry, cannot attach this image". NO STACK ERRORS. nothign in the logs I can use.
Code:
Uri smsUri = Uri.parse("tel:0000000");
Intent intent = new Intent(Intent.ACTION_SEND, smsUri);
intent.setType("image/*");
intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("image"));
intent.putExtra(Intent.EXTRA_TEXT,"Today");
startActivity(intent);
and other stuff like that that.
I currently am loading a known file into the message and it works perfect. Problem is, I wont know the name of the file, because my screenshots get saved as image1, image2, etc. So it will be different in every case.
So im wondering if its even possible to pass and extra through twice like that, or if I should look into return the latest image in that sdcard folder with like lastIndexOf(), or something similar.
basically, is there a way to simply query find and attach the highest numbered file? without a GUI(i can do select from gallery, but am trying to make it more automated).
any thoughts would be appreciated.
P.S. i know about the lint errors and things, and somewhat sloppy self taught java, but its working. only worried about the image passing.
Click to expand...
Click to collapse
I would just pass the filename to the share intent. In your saving method return the file name and pass it to the Uri.
lastIndexOf is a bad idea. What will you do if somebody saves a file called "xyz" in the same directory? The app will send this every time. So store the filename and pass it to the Uri.
nikwen said:
I would just pass the filename to the share intent. In your saving method return the file name and pass it to the Uri.
lastIndexOf is a bad idea. What will you do if somebody saves a file called "xyz" in the same directory? The app will send this every time. So store the filename and pass it to the Uri.
Click to expand...
Click to collapse
Yeah I had originally tried going about it that, with like getFileStreamPath and things like that, tried about a dozen different things but couldnt get them working. best i can get is that "sorry cant add..." message from the messaging app, which tells me that its passing the image, but it cant attach for some unknown reason(too large doesn't seem right, cuz i can do it with the known file name).
im a dum dum a probably should put this util class
Code:
static String saveBitmap(Bitmap bitmap, String dir, String baseName) {
try {
File sdcard = Environment.getExternalStorageDirectory();
File pictureDir = new File(sdcard, dir);
pictureDir.mkdirs();
File f = null;
for (int i = 1; i < 200; ++i) {
String name = baseName + i + ".png";
f = new File(pictureDir, name);
if (!f.exists()) {
break;
}
}
if (!f.exists()) {
String name = f.getAbsolutePath();
FileOutputStream fos = new FileOutputStream(name);
bitmap.compress(Bitmap.CompressFormat.PNG, 100, fos);
fos.flush();
fos.close();
//how to get "name" in third activity
return name;
}
} catch (Exception e) {
} finally {
/*
if (fos != null) {
fos.close();
}
*/
}
return null;
}
So I have the name there, but just cant get it over to the messaging. I'm wondering if I should take the pic and automaticaaly pin it to the MMS, and skip the imageview part?
First: Please get a logcat.
Second: This should be working if you use the right path:
Code:
Uri smsUri = Uri.parse("tel:0000000");
Intent intent = new Intent(Intent.ACTION_SEND, smsUri);
intent.setType("image/*");
intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("<path here>"));
intent.putExtra(Intent.EXTRA_TEXT,"Today");
startActivity(intent);
(got it from your first post)
1. This is a for instance situtation of if i try sliding the extra or something else into Uri.parse()
E/Mms/compose( 1063): DRM error in onActivityResult()!
E/Mms/media( 1063): IOException caught while opening or reading stream
E/Mms/media( 1063): java.io.FileNotFoundException: No content provider: image
But the content of image makes it into the ImageView(as "getParcelableExtra("image"), just not in the MMS, so I don't know.
2. Yeah it works Perfect when I hardcode in a file( sdcard/folder/image1.png). attaches and sends perfect.
The problem is basically I have a loose understanding of how I should be doing this, and just cant figure out how I should properly be getting it to load.
Banging my head against the wall on this one. lol. :fingers-crossed:
out of ideas said:
1. This is a for instance situtation of if i try sliding the extra or something else into Uri.parse()
E/Mms/compose( 1063): DRM error in onActivityResult()!
E/Mms/media( 1063): IOException caught while opening or reading stream
E/Mms/media( 1063): java.io.FileNotFoundException: No content provider: image
But the content of image makes it into the ImageView(as "getParcelableExtra("image"), just not in the MMS, so I don't know.
2. Yeah it works Perfect when I hardcode in a file( sdcard/folder/image1.png). attaches and sends perfect.
The problem is basically I have a loose understanding of how I should be doing this, and just cant figure out how I should properly be getting it to load.
Banging my head against the wall on this one. lol. :fingers-crossed:
Click to expand...
Click to collapse
The problem is that you do not pass the right file name. So it cannot find the file.
---------- Post added at 07:55 PM ---------- Previous post was at 07:48 PM ----------
Change it to this and tell us the log output:
Code:
static String saveBitmap(Bitmap bitmap, String dir, String baseName) {
try {
File sdcard = Environment.getExternalStorageDirectory();
File pictureDir = new File(sdcard, dir);
pictureDir.mkdirs();
File f = null;
for (int i = 1; i < 200; ++i) {
String name = baseName + i + ".png";
f = new File(pictureDir, name);
if (!f.exists()) {
break;
}
}
if (!f.exists()) {
Log.d("file", "file does not exist");
String name = f.getAbsolutePath();
FileOutputStream fos = new FileOutputStream(name);
bitmap.compress(Bitmap.CompressFormat.PNG, 100, fos);
fos.flush();
fos.close();
//how to get "name" in third activity
if (name != null) {
Log.d("return", name);
} else {
Log.d("return", "name = null");
}
return name;
} else {
Log.d("file", "file exists");
}
} catch (Exception e) {
e.printStackTrace();
} finally {
/*
if (fos != null) {
fos.close();
}
*/
}
Log.d("return", "null");
return null;
}
I just inserted some debugging things. Check the logcat (and post it).
Did you add this to your manifest?
Code:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
nikwen said:
The problem is that you do not pass the right file name. So it cannot find the file.
I just inserted some debugging things. Check the logcat (and post it).
Did you add this to your manifest?
Code:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Click to expand...
Click to collapse
i know! I just need a way to get what my Util class returns as name. then open that attached to Message. It seems like it should be a lot easier than I am making it.
i added your logs, but the only match back I get is here (I put in some extra stuff)
Code:
D/ViewRoot( 2072): Dispatching pointer MotionEvent{2b00f540 action=1 x=85.33334 y=179.98325 pressure=0.20000002 size=0.20000002} to [email protected]
D/dalvikvm( 2072): GC_EXTERNAL_ALLOC freed 82K, 45% free 3083K/5575K, external 2159K/2284K, paused 57ms
//[B]THIS RIGHT BELOW HERE IS THE FILENAME. I NEED TO RETURN IT IN THE OTHER ACTIVITY. But How?
D/return ( 2072): /mnt/sdcard/folder/screen162.png
[/B]
I/ActivityManager( 182): Starting: Intent { cmp=com.myapp/.Screenshots (has extras) } from pid 2072
E/ActivityThread( 2072): >>> handling: 101
W/WindowManager( 182): Reached focused app: AppWindowToken{2b70bbf8 token=HistoryRecord{2b28ff08 com.myapp/.Screenshots}}
W/WindowManager( 182): updateFocusedWindowLocked newFocus=null mode=0 mCurrentFocus = Window{2b332630 PopupWindow:2afbd178 paused=false}
W/WindowManager( 182): Reached focused app: AppWindowToken{2b70bbf8 token=HistoryRecord{2b28ff08 com.myapp/.Screenshots}}
W/WindowManager( 182): updateFocusedWindowLocked newFocus=Window{2b408a60 com.myapp/com.myapp.Screenshots paused=false} mode=2 mCurrentFocus = Window{2b408a60 com.myapp/com.myapp.Screenshots paused=false}
W/WindowManager( 182): updateFocusedWindowLocked newFocus=Window{2b408a60 com.myapp/com.myapp.Screenshots paused=false} mode=3 mCurrentFocus = Window{2b408a60 com.myapp/com.myapp.Screenshots paused=false}
W/WindowManager( 182): Window Window{2b320c38 com.myapp/com.myapp.MainActivity paused=false} destroying surface Surface(name=com.myapp/com.myapp.MainActivity, identity=204), session Session{2b542460 uid 10050}
W/WindowManager( 182): Window Window{2b332630 PopupWindow:2afbd178 paused=false} destroying surface Surface(name=PopupWindow:2afbd178, identity=205), session Session{2b542460 uid 10050}
I/ActivityManager( 182): Displayed com.myapp/.Screenshots: +549ms
W/WindowManager( 182): Reached focused app: AppWindowToken{2b2dfeb8 token=HistoryRecord{2b395530 com.android.mms/.ui.ComposeMessageActivity}}
D/ActivityThread( 2072): <<< done: 106
W/WindowManager( 182): updateFocusedWindowLocked newFocus=null mode=3 mCurrentFocus = null
W/WindowManager( 182): Reached focused app: AppWindowToken{2b2dfeb8 token=HistoryRecord{2b395530 com.android.mms/.ui.ComposeMessageActivity}}
W/WindowManager( 182): Reached focused app: AppWindowToken{2b2dfeb8 token=HistoryRecord{2b395530 com.android.mms/.ui.ComposeMessageActivity}}
W/WindowManager( 182): Reached focused app: AppWindowToken{2b2dfeb8 token=HistoryRecord{2b395530 com.android.mms/.ui.ComposeMessageActivity}}
W/WindowManager( 182): updateFocusedWindowLocked newFocus=null mode=3 mCurrentFocus = null
W/WindowManager( 182): Reached focused app: AppWindowToken{2b2dfeb8 token=HistoryRecord{2b395530 com.android.mms/.ui.ComposeMessageActivity}}
W/WindowManager( 182): updateFocusedWindowLocked newFocus=null mode=3 mCurrentFocus = null
I/ActivityThread( 2081): Pub com.android.mms.SuggestionsProvider:
com.android.mms.SuggestionsProvider
E/MmsCustom( 2081): Mms,MmsCustom
E/MmsCustom( 2081): Init before calling function of doPreSotred()
E/MmsCustom( 2081): mms config have been prestored before
Yeah, I took 162 screenshots so far trying to get this. lol.
And yeah I declared the right permissions and everything. It takes the screenshot, saves it, and passes it to an ImageView in a different activity perfectly.
I can open Messaging, or FB,picassa, etc. It appends the text, but no image. BUT, i can simply hit attach from the opened message, and add in whatever picture I want.
I thought about just sending people into the gallery to pick, but the android numbering convention doesn't load images in sequential order, but a sort of numerical alphabetical( it saves likes 1, 10, 11,12,13,14,15,16,17,18,19,2,20,21,22,etc). At least this is with quickpic.
So they really get jumbled up, especially with 100+ in there(1, 10,100,11,12). And the point of this segment of the app is to share the most recent image.
i also dont want to just use the currentsystem time, because a ton of numbers is too confusing if they want to find a different one.
Thanks a lot for the help.
Let's try:
Code:
[COLOR="Red"]String path = Utils.saveBitmap(bitmap, dir, baseName);[/COLOR] //replace Utils by your class name
Uri smsUri = Uri.parse("tel:0000000");
Intent intent = new Intent(Intent.ACTION_SEND, smsUri);
intent.setType("image/*");
intent.putExtra(Intent.EXTRA_STREAM, Uri.[COLOR="Red"]fromFile(path)[/COLOR]);
intent.putExtra(Intent.EXTRA_TEXT,"Today");
[COLOR="Red"]intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);[/COLOR]
startActivity(intent);
Took awhile to get Eclipse to accept it, but now I get
Code:
W/System.err( 2002): java.lang.NullPointerException
W/System.err( 2002): at com.MYAPP.Util.saveBitmap(Util.java:39)
//////The top red line you suggested
W/System.err( 2002): at com.MYAPP.Screenshots.onOptionsItemSelected(Screenshots.java:79)
W/System.err( 2002): at android.support.v4.app.Watson.onMenuItemSelected(Watson.java:119)
W/System.err( 2002): at com.actionbarsherlock.ActionBarSherlock.callbackOptionsItemSelected(ActionBarSherlock.java:603)
W/System.err( 2002): at com.actionbarsherlock.internal.ActionBarSherlockCompat.onMenuItemSelected(ActionBarSherlockCompat.java:529)
W/System.err( 2002): at com.actionbarsherlock.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:738)
W/System.err( 2002): at com.actionbarsherlock.internal.view.menu.SubMenuBuilder.dispatchMenuItemSelected(SubMenuBuilder.java:83)
W/System.err( 2002): at com.actionbarsherlock.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:148)
W/System.err( 2002): at com.actionbarsherlock.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:879)
W/System.err( 2002): at com.actionbarsherlock.internal.view.menu.MenuPopupHelper.onItemClick(MenuPopupHelper.java:158)
W/System.err( 2002): at android.widget.AdapterView.performItemClick(AdapterView.java:284)
W/System.err( 2002): at android.widget.ListView.performItemClick(ListView.java:3513)
W/System.err( 2002): at android.widget.AbsListView$PerformClick.run(AbsListView.java:1812)
W/System.err( 2002): at android.os.Handler.handleCallback(Handler.java:587)
W/System.err( 2002): at android.os.Handler.dispatchMessage(Handler.java:92)
W/System.err( 2002): at android.os.Looper.loop(Looper.java:130)
W/System.err( 2002): at android.app.ActivityThread.main(ActivityThread.java:3822)
W/System.err( 2002): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 2002): at java.lang.reflect.Method.invoke(Method.java:507)
W/System.err( 2002): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
W/System.err( 2002): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
W/System.err( 2002): at dalvik.system.NativeStart.main(Native Method)
D/return ( 2002): null
D/AndroidRuntime( 2002): Shutting down VM
W/dalvikvm( 2002): threadid=1: thread exiting with uncaught exception (group=0x2aac4560)
E/AndroidRuntime( 2002): FATAL EXCEPTION: main
E/AndroidRuntime( 2002): java.lang.NullPointerException: uriString
E/AndroidRuntime( 2002): at android.net.Uri$StringUri.<init>(Uri.java:420)
E/AndroidRuntime( 2002): at android.net.Uri$StringUri.<init>(Uri.java:410)
E/AndroidRuntime( 2002): at android.net.Uri.parse(Uri.java:382)
//////The Changed Uri.getFile(); Line
E/AndroidRuntime( 2002): at com.MYAPP.Screenshots.onOptionsItemSelected(Screenshots.java:82)
E/AndroidRuntime( 2002): at android.support.v4.app.Watson.onMenuItemSelected(Watson.java:119)
E/AndroidRuntime( 2002): at com.actionbarsherlock.ActionBarSherlock.callbackOptionsItemSelected(ActionBarSherlock.java:603)
E/AndroidRuntime( 2002): at com.actionbarsherlock.internal.ActionBarSherlockCompat.onMenuItemSelected(ActionBarSherlockCompat.java:529)
E/AndroidRuntime( 2002): at com.actionbarsherlock.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:738)
E/AndroidRuntime( 2002): at com.actionbarsherlock.internal.view.menu.SubMenuBuilder.dispatchMenuItemSelected(SubMenuBuilder.java:83)
E/AndroidRuntime( 2002): at com.actionbarsherlock.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:148)
E/AndroidRuntime( 2002): at com.actionbarsherlock.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:879)
E/AndroidRuntime( 2002): at com.actionbarsherlock.internal.view.menu.MenuPopupHelper.onItemClick(MenuPopupHelper.java:158)
E/AndroidRuntime( 2002): at android.widget.AdapterView.performItemClick(AdapterView.java:284)
E/AndroidRuntime( 2002): at android.widget.ListView.performItemClick(ListView.java:3513)
E/AndroidRuntime( 2002): at android.widget.AbsListView$PerformClick.run(AbsListView.java:1812)
E/AndroidRuntime( 2002): at android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime( 2002): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 2002): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 2002): at android.app.ActivityThread.main(ActivityThread.java:3822)
E/AndroidRuntime( 2002): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 2002): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 2002): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime( 2002): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime( 2002): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 181): Force finishing activity com.MYAPP/.Screenshots
W/WindowManager( 181)
Starting to think I should just dump the whole imageview thing.
i need to figure out if i can save to SD how I am doing, and ALSO save to a cache (and overwrite other ones, so only one image persists there)
out of ideas said:
Took awhile to get Eclipse to accept it, but now I get
Code:
W/System.err( 2002): java.lang.NullPointerException
W/System.err( 2002): at com.MYAPP.Util.saveBitmap(Util.java:39)
//////The top red line you suggested
W/System.err( 2002): at com.MYAPP.Screenshots.onOptionsItemSelected(Screenshots.java:79)
W/System.err( 2002): at android.support.v4.app.Watson.onMenuItemSelected(Watson.java:119)
W/System.err( 2002): at com.actionbarsherlock.ActionBarSherlock.callbackOptionsItemSelected(ActionBarSherlock.java:603)
W/System.err( 2002): at com.actionbarsherlock.internal.ActionBarSherlockCompat.onMenuItemSelected(ActionBarSherlockCompat.java:529)
W/System.err( 2002): at com.actionbarsherlock.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:738)
W/System.err( 2002): at com.actionbarsherlock.internal.view.menu.SubMenuBuilder.dispatchMenuItemSelected(SubMenuBuilder.java:83)
W/System.err( 2002): at com.actionbarsherlock.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:148)
W/System.err( 2002): at com.actionbarsherlock.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:879)
W/System.err( 2002): at com.actionbarsherlock.internal.view.menu.MenuPopupHelper.onItemClick(MenuPopupHelper.java:158)
W/System.err( 2002): at android.widget.AdapterView.performItemClick(AdapterView.java:284)
W/System.err( 2002): at android.widget.ListView.performItemClick(ListView.java:3513)
W/System.err( 2002): at android.widget.AbsListView$PerformClick.run(AbsListView.java:1812)
W/System.err( 2002): at android.os.Handler.handleCallback(Handler.java:587)
W/System.err( 2002): at android.os.Handler.dispatchMessage(Handler.java:92)
W/System.err( 2002): at android.os.Looper.loop(Looper.java:130)
W/System.err( 2002): at android.app.ActivityThread.main(ActivityThread.java:3822)
W/System.err( 2002): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 2002): at java.lang.reflect.Method.invoke(Method.java:507)
W/System.err( 2002): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
W/System.err( 2002): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
W/System.err( 2002): at dalvik.system.NativeStart.main(Native Method)
D/return ( 2002): null
D/AndroidRuntime( 2002): Shutting down VM
W/dalvikvm( 2002): threadid=1: thread exiting with uncaught exception (group=0x2aac4560)
E/AndroidRuntime( 2002): FATAL EXCEPTION: main
E/AndroidRuntime( 2002): java.lang.NullPointerException: uriString
E/AndroidRuntime( 2002): at android.net.Uri$StringUri.<init>(Uri.java:420)
E/AndroidRuntime( 2002): at android.net.Uri$StringUri.<init>(Uri.java:410)
E/AndroidRuntime( 2002): at android.net.Uri.parse(Uri.java:382)
//////The Changed Uri.getFile(); Line
E/AndroidRuntime( 2002): at com.MYAPP.Screenshots.onOptionsItemSelected(Screenshots.java:82)
E/AndroidRuntime( 2002): at android.support.v4.app.Watson.onMenuItemSelected(Watson.java:119)
E/AndroidRuntime( 2002): at com.actionbarsherlock.ActionBarSherlock.callbackOptionsItemSelected(ActionBarSherlock.java:603)
E/AndroidRuntime( 2002): at com.actionbarsherlock.internal.ActionBarSherlockCompat.onMenuItemSelected(ActionBarSherlockCompat.java:529)
E/AndroidRuntime( 2002): at com.actionbarsherlock.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:738)
E/AndroidRuntime( 2002): at com.actionbarsherlock.internal.view.menu.SubMenuBuilder.dispatchMenuItemSelected(SubMenuBuilder.java:83)
E/AndroidRuntime( 2002): at com.actionbarsherlock.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:148)
E/AndroidRuntime( 2002): at com.actionbarsherlock.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:879)
E/AndroidRuntime( 2002): at com.actionbarsherlock.internal.view.menu.MenuPopupHelper.onItemClick(MenuPopupHelper.java:158)
E/AndroidRuntime( 2002): at android.widget.AdapterView.performItemClick(AdapterView.java:284)
E/AndroidRuntime( 2002): at android.widget.ListView.performItemClick(ListView.java:3513)
E/AndroidRuntime( 2002): at android.widget.AbsListView$PerformClick.run(AbsListView.java:1812)
E/AndroidRuntime( 2002): at android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime( 2002): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 2002): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 2002): at android.app.ActivityThread.main(ActivityThread.java:3822)
E/AndroidRuntime( 2002): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 2002): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 2002): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime( 2002): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime( 2002): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 181): Force finishing activity com.MYAPP/.Screenshots
W/WindowManager( 181)
Starting to think I should just dump the whole imageview thing.
i need to figure out if i can save to SD how I am doing, and ALSO save to a cache (and overwrite other ones, so only one image persists there)
Click to expand...
Click to collapse
Post your code. We cannot help you if you just say "I changed this line."
It is not getFile but fromFile.
HaHa I know, im not trying to throw puzzles out at people randomly.
But the errors in the log were from those new lines(in red)
the string path
and fromFile path ones
I may be getting somewhere with this though, i found a little section on stackoverflow that i hadn't seen in the other 30 questions about images or screenshots. :fingers-crossed:
Plus i glad I always have about 5 other projects on can work on when I get stuck.
out of ideas said:
HaHa I know, im not trying to throw puzzles out at people randomly.
But the errors in the log were from those new lines(in red)
the string path
and fromFile path ones
I may be getting somewhere with this though, i found a little section on stackoverflow that i hadn't seen in the other 30 questions about images or screenshots. :fingers-crossed:
Plus i glad I always have about 5 other projects on can work on when I get stuck.
Click to expand...
Click to collapse
The problem occurs in the saveBitmap method. For that reason the path is null and then a NPE is thrown. Check your code to save the bitmap.

[Solved]Stuck at Boot Logo with Bootloop, Need help reading Logcat

I'm running Stock 4.1.2 with busybox installed, root, and XposedFramework.
Last night my device froze so I had to hard-reboot it. I turned it off then turned it on, it was late so I went to bed. I woke up in the morning went to pick it up and it was still on the boot screen. It was hot and after booting into recovery it said that I had only 15% battery left. I was dumbfounded. I tried to boot again, and it got stuck again. After all the trouble shooting I could think of(Including disabling and removing Xposed), I wiped my /system partition and flashed the Stock /system image. Sadly that didn't help. It seems the problem resides on my /data partition somewhere but obviously if I'm wiping that I might as well start from scratch.
Below is my Logcat. If you can gleam anything from it please let me know. I'm pretty-tech savvy but I still have zero expirience reading Logcats. At the very least I'd like to know what the error is exactly so I can endevor to avoid it in the future.
japzone said:
I'm running Stock 4.1.2 with busybox installed, root, and XposedFramework.
Last night my device froze so I had to hard-reboot it. I turned it off then turned it on, it was late so I went to bed. I woke up in the morning went to pick it up and it was still on the boot screen. It was hot and after booting into recovery it said that I had only 15% battery left. I was dumbfounded. I tried to boot again, and it got stuck again. After all the trouble shooting I could think of(Including disabling and removing Xposed), I wiped my /system partition and flashed the Stock /system image. Sadly that didn't help. It seems the problem resides on my /data partition somewhere but obviously if I'm wiping that I might as well start from scratch.
Below is my Logcat. If you can gleam anything from it please let me know. I'm pretty-tech savvy but I still have zero expirience reading Logcats. At the very least I'd like to know what the error is exactly so I can endevor to avoid it in the future.
Click to expand...
Click to collapse
Hi there ! This seems to be the problem in your case :
Code:
Sending signal. PID: 349 SIG: 9
E/AndroidRuntime( 349): *** FATAL EXCEPTION IN SYSTEM PROCESS: ActivityManager
E/AndroidRuntime( 349): java.lang.ArrayIndexOutOfBoundsException: src.length=8192 srcPos=1 dst.length=8192 dstPos=0 length=-1
E/AndroidRuntime( 349): at java.lang.System.arraycopy(Native Method)
E/AndroidRuntime( 349): at org.kxml2.io.KXmlParser.fillBuffer(KXmlParser.java:1489)
E/AndroidRuntime( 349): at org.kxml2.io.KXmlParser.skip(KXmlParser.java:1574)
E/AndroidRuntime( 349): at org.kxml2.io.KXmlParser.parseStartTag(KXmlParser.java:1049)
E/AndroidRuntime( 349): at org.kxml2.io.KXmlParser.next(KXmlParser.java:369)
E/AndroidRuntime( 349): at org.kxml2.io.KXmlParser.next(KXmlParser.java:310)
E/AndroidRuntime( 349): at com.android.server.am.UsageStatsService.readHistoryStatsFLOCK(UsageStatsService.java:376)
E/AndroidRuntime( 349): at com.android.server.am.UsageStatsService.readHistoryStatsFromFile(UsageStatsService.java:357)
E/AndroidRuntime( 349): at com.android.server.am.UsageStatsService.<init>(UsageStatsService.java:274)
E/AndroidRuntime( 349): at com.android.server.am.ActivityManagerService.<init>(ActivityManagerService.java:1534)
E/AndroidRuntime( 349): at com.android.server.am.ActivityManagerService.<init>(ActivityManagerService.java:160)
E/AndroidRuntime( 349): at com.android.server.am.ActivityManagerService$AThread.run(ActivityManagerService.java:1405)
E/AndroidRuntime( 349): Error reporting crash
E/AndroidRuntime( 349): java.lang.NullPointerException
E/AndroidRuntime( 349): at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:76)
E/AndroidRuntime( 349): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
E/AndroidRuntime( 349): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
As you can see the lines start with E:/ which stand for error .
V stands for Verbose
I for information
D for Debug.
And some others . more about these.. I suggest you Google. Now you will ask how I found out the error ? Well if you take a closer look to the log you will notice that once the kernel is initialized ( which happens at the Google logo ) the netd framework starts booting by the kernel.
Normal boot sequence is kernel > its init.rd and init.rc then the init.d and then the framework. How I came to know all this ? Take a log of a normally booting ROM
If you again carefully observe the log .. You will notice log re iterates. It goes on an infinite loop. Hence the term boot'loop'.
The start of the loop is
Code:
AndroidRuntime( 369): >>>>>> AndroidRuntime START com.android.internal.os.ZygoteInit <<<<<<
D/AndroidRuntime( 369): CheckJNI is OFF
And this Is the dead / bad code
Code:
ygote ( 369): Exit zygote because system server (508) has terminated
I/ServiceManager( 118): service 'sensorservice' died
I/ServiceManager( 118): service 'entropy' died
I/ServiceManager( 118): service 'power' died
That's roughly how you read a logcat.
And about your problem. I suggest a clean wipe and reflash the ROM. Its always better to keep backing up your data from time to time. I also ensure I wipe clean even during flashing nightlies .
Sent from my HTC using xda app-developers app
Thanks for the reply. Nice crash course on log reading I have gone ahead and flashed a fresh install of PA ROM.
I really just wonder how the error might of happened. It occured at a bad time for me where my External Harddrive died on me taking my backups with it, and leaving me with nowhere to put new ones. My new Laptop with a 1TB drive is coming in August so I was planning on backing up and Flashing a Custom ROM then. But this error took out my device before I could make a backup. Oh well, I managed to scavenge most of my apps and hopefully will be able to restore them. Sadly I lost a day off to resuscitating my Nexus
Red Devil said:
Hi there ! This seems to be the problem in your case :
Code:
Sending signal. PID: 349 SIG: 9
E/AndroidRuntime( 349): *** FATAL EXCEPTION IN SYSTEM PROCESS: ActivityManager
E/AndroidRuntime( 349): java.lang.ArrayIndexOutOfBoundsException: src.length=8192 srcPos=1 dst.length=8192 dstPos=0 length=-1
E/AndroidRuntime( 349): at java.lang.System.arraycopy(Native Method)
E/AndroidRuntime( 349): at org.kxml2.io.KXmlParser.fillBuffer(KXmlParser.java:1489)
E/AndroidRuntime( 349): at org.kxml2.io.KXmlParser.skip(KXmlParser.java:1574)
E/AndroidRuntime( 349): at org.kxml2.io.KXmlParser.parseStartTag(KXmlParser.java:1049)
E/AndroidRuntime( 349): at org.kxml2.io.KXmlParser.next(KXmlParser.java:369)
E/AndroidRuntime( 349): at org.kxml2.io.KXmlParser.next(KXmlParser.java:310)
E/AndroidRuntime( 349): at com.android.server.am.UsageStatsService.readHistoryStatsFLOCK(UsageStatsService.java:376)
E/AndroidRuntime( 349): at com.android.server.am.UsageStatsService.readHistoryStatsFromFile(UsageStatsService.java:357)
E/AndroidRuntime( 349): at com.android.server.am.UsageStatsService.<init>(UsageStatsService.java:274)
E/AndroidRuntime( 349): at com.android.server.am.ActivityManagerService.<init>(ActivityManagerService.java:1534)
E/AndroidRuntime( 349): at com.android.server.am.ActivityManagerService.<init>(ActivityManagerService.java:160)
E/AndroidRuntime( 349): at com.android.server.am.ActivityManagerService$AThread.run(ActivityManagerService.java:1405)
E/AndroidRuntime( 349): Error reporting crash
E/AndroidRuntime( 349): java.lang.NullPointerException
E/AndroidRuntime( 349): at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:76)
E/AndroidRuntime( 349): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
E/AndroidRuntime( 349): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
As you can see the lines start with E:/ which stand for error .
V stands for Verbose
I for information
D for Debug.
And some others . more about these.. I suggest you Google. Now you will ask how I found out the error ? Well if you take a closer look to the log you will notice that once the kernel is initialized ( which happens at the Google logo ) the netd framework starts booting by the kernel.
Normal boot sequence is kernel > its init.rd and init.rc then the init.d and then the framework. How I came to know all this ? Take a log of a normally booting ROM
If you again carefully observe the log .. You will notice log re iterates. It goes on an infinite loop. Hence the term boot'loop'.
The start of the loop is
Code:
AndroidRuntime( 369): >>>>>> AndroidRuntime START com.android.internal.os.ZygoteInit <<<<<<
D/AndroidRuntime( 369): CheckJNI is OFF
And this Is the dead / bad code
Code:
ygote ( 369): Exit zygote because system server (508) has terminated
I/ServiceManager( 118): service 'sensorservice' died
I/ServiceManager( 118): service 'entropy' died
I/ServiceManager( 118): service 'power' died
That's roughly how you read a logcat.
And about your problem. I suggest a clean wipe and reflash the ROM. Its always better to keep backing up your data from time to time. I also ensure I wipe clean even during flashing nightlies .
Sent from my HTC using xda app-developers app
Click to expand...
Click to collapse

[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:

[APP] chrulri's DroidTV mod [changed stream backend to MuMuDVB]

Hi!
I changed chrulri's DroidTV DVB viewer application to my needs:
1. Changed dvb stream backend from dvblast to MuMuDVB (changed udp unicast to http unicast)
2. Did not try anymore to play the channel on app, now you can choose the video player (no codec problems, Brazilian ISDB-T latm-aac/AVC support)
3. Reception status information displayed
4. Notification to rapidly stop the stream server.
What you need to run:
1. Rooted phone
2. DVB-T (ISDB-T) kernel module drivers (loaded!).
How:
1. Plug your dvb device (with a otg cable)
2. Run the program
3. Grant root access
4. Scan for channels
5. Select a channel to stream
6. Touch on "open player"
7. Select the player to use (I like bsplayer)
8. Enjoy live FTA DTV
*** All thanks to chrulri!!!
Source: https://github.com/OuNao/droidtv/tree/mumudvb
getting FC with this apk:
D/ChannelsActivity( 3136): watchChannel(0): BBC ONE Lon
I/Timeline( 3136): Timeline: Activity_launch_request id:com.chrulri.droidtv time:23860947
I/ActivityManager( 2588): START u0 {cmp=com.chrulri.droidtv/.StreamActivity (has extras)} from pid 3136
E/dalvikvm( 3136): Could not find class 'android.support.v4.app.NotificationCompat$Builder', referenced from method com.chrulri.droidtv.StreamActivity.addNotification
W/dalvikvm( 3136): VFY: unable to resolve new-instance 24 (Landroid/support/v4/app/NotificationCompat$Builder in Lcom/chrulri/droidtv/StreamActivity;
D/dalvikvm( 3136): VFY: replacing opcode 0x22 at 0x0000
D/dalvikvm( 3136): DexOpt: unable to opt direct call 0x0020 at 0x02 in Lcom/chrulri/droidtv/StreamActivity;.addNotification
D/StreamActivity( 3136): onCreate
D/AndroidRuntime( 3136): Shutting down VM
W/dalvikvm( 3136): threadid=1: thread exiting with uncaught exception (group=0x416d2ce0)
E/AndroidRuntime( 3136): FATAL EXCEPTION: main
E/AndroidRuntime( 3136): Process: com.chrulri.droidtv, PID: 3136
E/AndroidRuntime( 3136): java.lang.NoClassDefFoundError: android.support.v4.app.NotificationCompat$Builder
E/AndroidRuntime( 3136): at com.chrulri.droidtv.StreamActivity.addNotification(StreamActivity.java:212)
E/AndroidRuntime( 3136): at com.chrulri.droidtv.StreamActivity.onCreate(StreamActivity.java:94)
E/AndroidRuntime( 3136): at android.app.Activity.performCreate(Activity.java:5231)
E/AndroidRuntime( 3136): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
E/AndroidRuntime( 3136): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2169)
E/AndroidRuntime( 3136): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2271)
E/AndroidRuntime( 3136): at android.app.ActivityThread.access$800(ActivityThread.java:144)
E/AndroidRuntime( 3136): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1205)
E/AndroidRuntime( 3136): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 3136): at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 3136): at android.app.ActivityThread.main(ActivityThread.java:5146)
E/AndroidRuntime( 3136): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 3136): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 3136): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:796)
E/AndroidRuntime( 3136): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:612)
E/AndroidRuntime( 3136): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 2588): Force finishing activity com.chrulri.droidtv/.StreamActivity
W/ActivityManager( 2588): Force finishing activity com.chrulri.droidtv/.ChannelsActivity
according to http://igordcard.blogspot.co.uk/2013/05/android-latest-sdk-javalangclassnotfoun.html To fix this, developers must now explicitly export the Android Private Libraries.
Fix:
Open the properties of your Android projects (even the ones that are included by other projects), select Java Build Path, Order and Export, and finally check Android Private Libraries.
I am new to android development, I have android studio though, is the above correct and easy to do?
well to answer my own post, I fixed that problem and rebuilt the apk, vlc and mxplayer are offered as media players when the stream starts by neither can play it. I have bsplayer installed but that is not offered as an option for some reason. I believe that dvb-t in the uk is mpeg2, so either none of the players can play the stream or the kernel modules that I built are streaming garbage. the dongle works find on my linux laptop with me-tv.
going to try some other players now, not sure how to check a valid stream is being produced though.
Could you please share your repaired apk? thank you
scote said:
well to answer my own post, I fixed that problem and rebuilt the apk, vlc and mxplayer are offered as media players when the stream starts by neither can play it. I have bsplayer installed but that is not offered as an option for some reason. I believe that dvb-t in the uk is mpeg2, so either none of the players can play the stream or the kernel modules that I built are streaming garbage. the dongle works find on my linux laptop with me-tv.
going to try some other players now, not sure how to check a valid stream is being produced though.
Click to expand...
Click to collapse
Thank you for the tip. I will change de code.
The streamActivity initiate a intent with a url of type video/mpeg, any program with intent filter set to get a http (mumudvb branch, not master!!!) url of video/mpeg type must be offered...
What kernel version you are using. I compiled the mumudvb binary with kernel 3.4 headers. Maybe the mumudvb backend used can´t work with your kernel modules...
sfortier, could you rebuild all native binaries adding to CFLAGS and LDFLAGS "-fPIE -pie", so your setup would run on any Android 5+?
I already did that for w_scan, dvblast and dvblastctl, but since you did not include instructions how to download and build MuMuDVB for android I can not do it myself.
Thanks in advance.
t_i_t_o said:
sfortier, could you rebuild all native binaries adding to CFLAGS and LDFLAGS "-fPIE -pie", so your setup would run on any Android 5+?
I already did that for w_scan, dvblast and dvblastctl, but since you did not include instructions how to download and build MuMuDVB for android I can not do it myself.
Thanks in advance.
Click to expand...
Click to collapse
Hi,
MuMuDVB repository now has instructions to build for android...
Hi,
Seeing as the version w_scan is not available to download, could someone recompile this with the latest version and create an APK?
Especially to run on a 5+ Android phone, with PIE.
Thanks,
E

Categories

Resources