ads

Affichage des articles dont le libellé est Include. Afficher tous les articles
Affichage des articles dont le libellé est Include. Afficher tous les articles

samedi 12 septembre 2015

[Q] Is possible to modify (include app) stock ROM and flash it w/o root?



Hi Guys!
I am looking for this thing for a while... but i didn´t find anything clear about it, so i hope someone could help me with this...
My idea is to modify my phone´s stock ROM a little bit (just to include an app - called Cerberus) without rooting it.
Can i download the stock ROM (from samsung), extract its contents and modify it and then put them back into tar.md5 to flash with odin?
If it is possible where can i find a good reference for doing this?

Thank you!
Raphael.



dimanche 6 septembre 2015

What does this OTA include?



I'm running the stock rom from the 7.23.502.1 RUU. Last night I received notification that an OTA update has been downloaded and ready to install. Since I'm rooted, have TWRP installed, and have deleted most of the AT&T bloatware, I know the OTA won't flash. I pretty much need to run the RUU again, flash the OTA and set up everything from scratch. I'd rather not take the time to do that right now unless this includes the Stagefright patch. I haven't read anywhere that AT&T was even going to patch the M7. Patches for the M8 & M9 started rolling out a couple of weeks ago. From what I've read, those updates were about 50MB. The file I got is 193MB. I can't find any information anywhere regarding an update coming from AT&T for the M7, be it Stagefright, Sense 7 or Android 5.1.

I did notice something odd with this download. In the past all the OTAs I received downloaded to /cache/fumo/OTAPkg.zip. The one I just received was downloaded to /sdcard/fumo/OTAPkg.zip. Probably just being paranoid, but could some sort of malware disguise itself as an OTA?

Do any of the insiders here have info on what this update includes? Also, any way to kill the reminder to install the update w/o actually installing the update? If I delete the OTAPkg.zip, any way to prevent it from downloading again until I specifically request it?



samedi 29 août 2015

android.view.InflateException: Binary XML file line #1: Error inflating class include



I have a certain App that was using different layouts for different activities, but much of the xml content was same. So I moved the content to a common xml and included that in the different layouts.

This is the common layout xml:


Code:


<LinearLayout xmlns:android="http;//schemas.android.com/apk/res/android"
              xmlns:app="http;//schemas.android.com/apk/res-auto"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              android:orientation="vertical"
              android:background="@color/background_color">

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="0dp"
        android:layout_marginLeft="10dp"
        android:layout_marginRight="10dp"
        android:orientation="horizontal" >

        <ImageView
            android:id="@+id/img_newslist"
            android:layout_width="35dp"
            android:layout_height="35dp"
            android:scaleType="centerCrop"
            android:layout_margin="0dp"
            android:layout_gravity="center_vertical" />

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:padding="5dp"
            android:orientation="vertical"
            android:gravity="center_vertical">

            <TextView
                android:id="@+id/txt_newslistheading"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:maxLines="2"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:textColor="@color/text_color"
                android:textSize="14sp"
                android:text="Heading"/>

            <TextView
                android:id="@+id/txt_newslistdate"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dp"
                android:textColor="@color/text_color"
                android:text="Date"
                android:visibility="invisible"/>

        </LinearLayout>

    </LinearLayout>

</LinearLayout>


This is the layout xml that includes the above xml:


Code:


<include
    android:layout="@layout/lsv_item_list"
    android:id="@+id/lsv_item_recent"
    xmlns:android="http;//schemas.android.com/apk/res/android"
    xmlns:app="http;//schemas.android.com/apk/res-auto"/>


With these changes the app is failing at run time with the following error:


Quote:









08-29 13:48:59.717 32104-32104/com.apps.nis D/AndroidRuntime﹕ Shutting down VM
08-29 13:48:59.717 32104-32104/com.apps.nis E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.apps.nis, PID: 32104
android.view.InflateException: Binary XML file line #1: Error inflating class include
at android.view.LayoutInflater.createViewFromTag(Layo utInflater.java:757)
at android.view.LayoutInflater.inflate(LayoutInflater .java:482)
at android.view.LayoutInflater.inflate(LayoutInflater .java:414)
at android.view.LayoutInflater.inflate(LayoutInflater .java:365)
at com.apps.nis.Adapter_Recent.getView(Adapter_Recent .java:43)
at android.widget.AbsListView.obtainView(AbsListView. java:2347)
at android.widget.ListView.makeAndAddView(ListView.ja va:1864)
at android.widget.ListView.fillDown(ListView.java:698 )
at android.widget.ListView.fillFromTop(ListView.java: 759)
at android.widget.ListView.layoutChildren(ListView.ja va:1673)
at android.widget.AbsListView.onLayout(AbsListView.ja va:2151)
at android.view.View.layout(View.java:15671)
at android.view.ViewGroup.layout(ViewGroup.java:5038)
at android.widget.RelativeLayout.onLayout(RelativeLay out.java:1076)
at android.view.View.layout(View.java:15671)
at android.view.ViewGroup.layout(ViewGroup.java:5038)
at android.widget.FrameLayout.layoutChildren(FrameLay out.java:579)
at android.widget.FrameLayout.onLayout(FrameLayout.ja va:514)
at android.view.View.layout(View.java:15671)
at android.view.ViewGroup.layout(ViewGroup.java:5038)
at android.support.v4.view.ViewPager.onLayout(ViewPag er.java:1594)
at android.view.View.layout(View.java:15671)
at android.view.ViewGroup.layout(ViewGroup.java:5038)
at android.widget.RelativeLayout.onLayout(RelativeLay out.java:1076)
at android.view.View.layout(View.java:15671)
at android.view.ViewGroup.layout(ViewGroup.java:5038)
at android.widget.FrameLayout.layoutChildren(FrameLay out.java:579)
at android.widget.FrameLayout.onLayout(FrameLayout.ja va:514)
at android.view.View.layout(View.java:15671)
at android.view.ViewGroup.layout(ViewGroup.java:5038)
at android.widget.LinearLayout.setChildFrame(LinearLa yout.java:1703)
at android.widget.LinearLayout.layoutVertical(LinearL ayout.java:1557)
at android.widget.LinearLayout.onLayout(LinearLayout. java:1466)
at android.view.View.layout(View.java:15671)
at android.view.ViewGroup.layout(ViewGroup.java:5038)
at android.widget.FrameLayout.layoutChildren(FrameLay out.java:579)
at android.widget.FrameLayout.onLayout(FrameLayout.ja va:514)
at android.view.View.layout(View.java:15671)
at android.view.ViewGroup.layout(ViewGroup.java:5038)
at android.widget.LinearLayout.setChildFrame(LinearLa yout.java:1703)
at android.widget.LinearLayout.layoutVertical(LinearL ayout.java:1557)
at android.widget.LinearLayout.onLayout(LinearLayout. java:1466)
at android.view.View.layout(View.java:15671)
at android.view.ViewGroup.layout(ViewGroup.java:5038)
at android.widget.FrameLayout.layoutChildren(FrameLay out.java:579)
at android.widget.FrameLayout.onLayout(FrameLayout.ja va:514)
at android.view.View.layout(View.java:15671)
at android.view.ViewGroup.layout(ViewGroup.java:5038)
at android.view.ViewRootImpl.performLayout(ViewRootIm pl.java:2086)
at android.view.ViewRootImpl.performTraversals(ViewRo otImpl.java:1843)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl .java:1061)
at android.view.ViewRootImpl$TraversalRunnable.run(Vi ewRootImpl.java:5885)
at android.view.Choreographer$CallbackRecord.run(Chor eographer.java:767)
at android.view.Choreographer.doCallbacks(Choreograph er.java:580)
at android.view.Choreographer.doFrame(Choreographer.j ava:550)
at android.view.Choreographer$FrameDisplayEventReceiv er.run(Choreographer.java:753)
at android.os.Handler.handleCallback(Handler.java:739 )
at android.os.Handler.dispatchMessage(Handler.java:95 )
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.jav a:5257)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:698)
Caused by: java.lang.Cla




Previously the app was working fine. Can somebody help me understand what I am doing wrong? The relevant code that is failing is as follows:


Code:


                public View getView(final int position, View convertView, ViewGroup parent) {
                        View view = convertView;
                        ViewHolder holder;
                        if (view == null) {
                                LayoutInflater inflater = (LayoutInflater) activity
                                                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                                view = inflater.inflate(row, null);

                                holder = new ViewHolder();
                                view.setTag(holder);
                        } else {
                                holder = (ViewHolder) view.getTag();
                        }

                        if ((itemsLatest == null) || ((position + 1) > itemsLatest.size()))
                                return view;

        if (position % 2 == 1) {
            view.setBackgroundColor(row2Color);
        } else {
            view.setBackgroundColor(row1Color);
        }

                        objLatestBean = itemsLatest.get(position);

                        holder.txt_newsheadinglatest=(TextView)view.findViewById(R.id.txt_newslistheading);
                        holder.txt_newsdatelatest=(TextView)view.findViewById(R.id.txt_newslistdate);
                        holder.img_newslatest=(ImageView)view.findViewById(R.id.img_newslist);
                       
                        holder.txt_newsheadinglatest.setText(objLatestBean.getNewsHeading().toString());
                        holder.txt_newsdatelatest.setText(objLatestBean.getNewsDate().toString());

                        imageLoader.DisplayImage(Constant.getServerImageThumbs () + objLatestBean.getNewsImage().toString(), holder.img_newslatest);       
                       
                        return view;
                       
                }


PS: I have changed : to ; in the URL above. That is not an error.