FORUMS
Remove All Ads from XDA

[COMMIT] [AOSP] JustArchi's ArchiDroid Optimizations V4.1 - Unleash the power!

8,740 posts
Thanks Meter: 38,904
 
By JustArchi, Recognized Contributor / Recognized Developer on 18th May 2014, 03:38 AM
Post Reply Email Thread
11th July 2016, 10:32 PM |#1631  
bigsupersquid's Avatar
Senior Member
Flag BFE, MO
Thanks Meter: 1,292
 
Donate to Me
More
Quote:
Originally Posted by PWn3R

So neither of you have fixed this? @JustArchi - you have any thoughts here? I even got medieval and put -g in the cflags in that file and the main BT ones to try to fix.

Original flags changes were made in system/bt/core/Android.mk

so when i added vynikal's squashed commit he pieced together for mm from justarchi's repo to my cm13 build, using uber 5.3 toolchains, i got the evil com.android.bt has stopped, Bluetooth share had stopped etc.
adding -Os to system/bt/Android.mk CFLAGS didn't solve it but i tracked my issue to packages/apps/Bluetooth/jni, added -Os to that directory's Android.mk CFLAGS as well, and now I'm good on BT.
testing it out, i needed the -Os in both those places together to make it work.
just fyi, maybe it'll help you and or others too since i hadn't seen reference to doing anything with the packages/apps/Bluetooth on my searching.
patches, specifically:
Code:
packages/apps/Bluetooth
commit d58f68c6f364eedc8771de1204d9a45073df2f82
Author: bigsupersquid <scrubbed>
Date:   Sun Jul 10 20:49:52 2016 -0500

    -Os jni
    
    Change-Id: Iafb2af0773bc093633483403e6bda7680130cf43

diff --git a/jni/Android.mk b/jni/Android.mk
index 68ca6e7..d973978 100644
--- a/jni/Android.mk
+++ b/jni/Android.mk
@@ -33,6 +33,7 @@ LOCAL_SHARED_LIBRARIES := \
 LOCAL_MULTILIB := 32
 
 #LOCAL_CFLAGS += -O0 -g
+LOCAL_CFLAGS += -Os
 
 LOCAL_MODULE := libbluetooth_jni
 LOCAL_MODULE_TAGS := optional

system/bt
commit 604eeb7c5a84c0fc4e1ecdda368271bc122c2a51
Author: bigsupersquid <scrubbed>
Date:   Sun Jul 10 20:51:08 2016 -0500

    -Os
    
    Change-Id: I9e4440b575c0b269dbb291ba0b34834a2a686e5c

diff --git a/Android.mk b/Android.mk
index b398132..dfdb788 100644
--- a/Android.mk
+++ b/Android.mk
@@ -38,7 +38,8 @@ bdroid_CFLAGS += \
   -Wno-unused-parameter \
   -Wunused-but-set-variable \
   -UNDEBUG \
-  -DLOG_NDEBUG=1
+  -DLOG_NDEBUG=1 \
+  -Os
 
 include $(call all-subdir-makefiles)
The Following 8 Users Say Thank You to bigsupersquid For This Useful Post: [ View ] Gift bigsupersquid Ad-Free
 
 
12th July 2016, 07:40 AM |#1632  
PWn3R's Avatar
Senior Member
Flag Flagstaff
Thanks Meter: 783
 
Donate to Me
More
Quote:
Originally Posted by bigsupersquid

so when i added vynikal's squashed commit he pieced together for mm from justarchi's repo to my cm13 build, using uber 5.3 toolchains, i got the evil com.android.bt has stopped, Bluetooth share had stopped etc.
adding -Os to system/bt/Android.mk CFLAGS didn't solve it but i tracked my issue to packages/apps/Bluetooth/jni, added -Os to that directory's Android.mk CFLAGS as well, and now I'm good on BT.
testing it out, i needed the -Os in both those places together to make it work.
just fyi, maybe it'll help you and or others too since i hadn't seen reference to doing anything with the packages/apps/Bluetooth on my searching.
patches, specifically:

Code:
packages/apps/Bluetooth
commit d58f68c6f364eedc8771de1204d9a45073df2f82
Author: bigsupersquid <scrubbed>
Date:   Sun Jul 10 20:49:52 2016 -0500

    -Os jni
    
    Change-Id: Iafb2af0773bc093633483403e6bda7680130cf43

diff --git a/jni/Android.mk b/jni/Android.mk
index 68ca6e7..d973978 100644
--- a/jni/Android.mk
+++ b/jni/Android.mk
@@ -33,6 +33,7 @@ LOCAL_SHARED_LIBRARIES := \
 LOCAL_MULTILIB := 32
 
 #LOCAL_CFLAGS += -O0 -g
+LOCAL_CFLAGS += -Os
 
 LOCAL_MODULE := libbluetooth_jni
 LOCAL_MODULE_TAGS := optional

system/bt
commit 604eeb7c5a84c0fc4e1ecdda368271bc122c2a51
Author: bigsupersquid <scrubbed>
Date:   Sun Jul 10 20:51:08 2016 -0500

    -Os
    
    Change-Id: I9e4440b575c0b269dbb291ba0b34834a2a686e5c

diff --git a/Android.mk b/Android.mk
index b398132..dfdb788 100644
--- a/Android.mk
+++ b/Android.mk
@@ -38,7 +38,8 @@ bdroid_CFLAGS += \
   -Wno-unused-parameter \
   -Wunused-but-set-variable \
   -UNDEBUG \
-  -DLOG_NDEBUG=1
+  -DLOG_NDEBUG=1 \
+  -Os
 
 include $(call all-subdir-makefiles)

Thanks for the information - I had tried doing everything with the bdroid flags or whatever it is in the system/bt directory. That didn't work. I've got a build running with your flag change on it right now. If it works I owe you several internets as do the rest of the people having this issue!

---------- Post added at 10:40 PM ---------- Previous post was at 09:50 PM ----------

Confirmed. Thank you!!!!!!

Sent from my Nexus 6 using Tapatalk
The Following User Says Thank You to PWn3R For This Useful Post: [ View ] Gift PWn3R Ad-Free
12th July 2016, 09:57 AM |#1633  
DorianX's Avatar
Senior Member
Flag Zapopan, Jalisco
Thanks Meter: 523
 
Donate to Me
More
Deleted...

Enviado desde mi Nexus 6P mediante Tapatalk
17th July 2016, 05:44 PM |#1634  
Senior Member
Thanks Meter: 300
 
More
all source code not found with 404 error.
ROM devs can't use your optimization
18th July 2016, 05:55 PM |#1635  
sagarshah1729's Avatar
Member
Flag Surat
Thanks Meter: 147
 
More
Quote:
Originally Posted by WhiteNeo

Great script! Tried this myself but it didn't work unfortunately.

However, I've found out that if you copy the /data/misc/adb/adb_keys file from a working and authorized rom to your bootlooping rom zip and add some lines to the updater-script to make it install, adb works flawlessly afterwards.

Was able to grab a log of my bootloop now.. Any opinions or ideas?

Code:
E/rmt_storage( 2039): Unable to change dir
E/rmt_storage( 2039): Failed in getting the physical address for shared mem
I/ServiceManager(  730): Waiting for service media.audio_policy...
W/AudioSystem(  730): AudioPolicyService not published, waiting...
I/ServiceManager(  730): Waiting for service media.audio_policy...
I/ServiceManager(  730): Waiting for service media.audio_policy...
EDIT: Just to clarify, "Waiting for service media.audio_policy..." is the problem.. I've tried removing rmt_storage binary, but the bootloop persisted. So Audio Policy is the reason.

Bro sorry for quoting your old post..I am getting the same error as you are getting while booting.. Took logcat and got the same Audio system error..Can you help me fixing it?
10th August 2016, 11:54 AM |#1636  
Senior Member
Thanks Meter: 43
 
More
I have bootloop, can someone help me please?
10th August 2016, 07:38 PM |#1637  
Senior Member
Thanks Meter: 43
 
More
Can anyone put the link of ART fix please?
11th August 2016, 03:07 PM |#1638  
puturaya20's Avatar
Senior Member
Thanks Meter: 38
 
More
Link eror for cm 11

https://github.com/JustArchi/android...fb47696647e05b
21st August 2016, 09:14 PM |#1639  
Senior Member
Thanks Meter: 43
 
More
I have this problem
Code:
matteo@matteo-SATELLITE-U920T ~/mako/build $ git remote add 32 -f git@github.com:Vynikal/android_build.git && git cherry pick 6af9a30f748153bf9bcab533dbaa7c964113aff2
Aggiornamento di 32
Da github.com:Vynikal/android_build
 * [nuovo branch]    caf/cm-12.0 -> 32/caf/cm-12.0
 * [nuovo branch]    caf/cm-12.1 -> 32/caf/cm-12.1
 * [nuovo branch]    cm-10.1    -> 32/cm-10.1
 * [nuovo branch]    cm-10.2    -> 32/cm-10.2
 * [nuovo branch]    cm-11.0    -> 32/cm-11.0
 * [nuovo branch]    cm-12.0    -> 32/cm-12.0
 * [nuovo branch]    cm-12.1    -> 32/cm-12.1
 * [nuovo branch]    cm-13-flags -> 32/cm-13-flags
 * [nuovo branch]    cm-13.0    -> 32/cm-13.0
 * [nuovo branch]    cm-9.0.0   -> 32/cm-9.0.0
 * [nuovo branch]    cm-9.1.0   -> 32/cm-9.1.0
 * [nuovo branch]    donut      -> 32/donut
 * [nuovo branch]    eclair     -> 32/eclair
 * [nuovo branch]    froyo      -> 32/froyo
 * [nuovo branch]    froyo-stable -> 32/froyo-stable
 * [nuovo branch]    gb-release-7.2 -> 32/gb-release-7.2
 * [nuovo branch]    gingerbread -> 32/gingerbread
 * [nuovo branch]    gingerbread-release -> 32/gingerbread-release
 * [nuovo branch]    ics        -> 32/ics
 * [nuovo branch]    ics-release -> 32/ics-release
 * [nuovo branch]    jellybean  -> 32/jellybean
 * [nuovo branch]    jellybean-release -> 32/jellybean-release
 * [nuovo branch]    jellybean-stable -> 32/jellybean-stable
 * [nuovo branch]    mr1.1-staging -> 32/mr1.1-staging
 * [nuovo branch]    qcril      -> 32/qcril
 * [nuovo branch]    shipping/cm-11.0 -> 32/shipping/cm-11.0
 * [nuovo branch]    stable/cm-10.2 -> 32/stable/cm-10.2
 * [nuovo branch]    stable/cm-11.0 -> 32/stable/cm-11.0
 * [nuovo branch]    stable/cm-11.0-XNF8Y -> 32/stable/cm-11.0-XNF8Y
 * [nuovo branch]    stable/cm-11.0-XNF9X -> 32/stable/cm-11.0-XNF9X
 * [nuovo branch]    stable/cm-11.0-XNG2S -> 32/stable/cm-11.0-XNG2S
 * [nuovo branch]    stable/cm-11.0-XNG3C -> 32/stable/cm-11.0-XNG3C
 * [nuovo branch]    stable/cm-12.0-YNG1T -> 32/stable/cm-12.0-YNG1T
 * [nuovo branch]    stable/cm-12.0-YNG1TA -> 32/stable/cm-12.0-YNG1TA
 * [nuovo branch]    stable/cm-12.0-YNG3C -> 32/stable/cm-12.0-YNG3C
 * [nuovo branch]    stable/cm-12.0-YNG4N -> 32/stable/cm-12.0-YNG4N
 * [nuovo branch]    stable/cm-12.1-YOG3C -> 32/stable/cm-12.1-YOG3C
 * [nuovo branch]    stable/cm-12.1-YOG4P -> 32/stable/cm-12.1-YOG4P
 * [nuovo branch]    stable/cm-12.1-YOG7D -> 32/stable/cm-12.1-YOG7D
 * [nuovo branch]    stable/cm-13.0-ZNH0E -> 32/stable/cm-13.0-ZNH0E
 * [nuovo branch]    staging/caf/themes/cm-12.0 -> 32/staging/caf/themes/cm-12.0
 * [nuovo branch]    staging/cm-12.0-caf -> 32/staging/cm-12.0-caf
 * [nuovo branch]    staging/cm-12.1 -> 32/staging/cm-12.1
fatal: Commit pick sconosciuto
The Following User Says Thank You to Mata99 For This Useful Post: [ View ] Gift Mata99 Ad-Free
6th September 2016, 10:24 PM |#1640  
bloodofJesus's Avatar
Senior Member
Flag Kampala
Thanks Meter: 143
 
Donate to Me
More
I have an error when building; cm12.1, How do I fix this without disabling strict aliasing ?
code snippet;
PHP Code:
 const uint32_t ddSignature = *(reinterpret_cast<const uint32_t*>(ddBuf)); 
Quote:

target arm C: libz <= external/zlib/src/uncompr.c
target arm C: libz <= external/zlib/src/zutil.c
target thumb C++: libziparchive <= system/core/libziparchive/zip_archive.cc
Import includes file: /home/media/android/system/out/target/product/honami/obj/SHARED_LIBRARIES/libaudioutils_intermediates/import_includes
target arm C: libspeexresampler <= external/speex/libspeex/resample.c
Import includes file: /home/media/android/system/out/target/product/honami/obj/SHARED_LIBRARIES/libcamera_client_intermediates/import_includes
target thumb C: libcamera_metadata <= system/media/camera/src/camera_metadata.c
system/core/libziparchive/zip_archive.cc: In function 'int32_t UpdateEntryFromDataDescriptor(int, ZipEntry*)':
system/core/libziparchive/zip_archive.cc:723:74: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
const uint32_t ddSignature = *(reinterpret_cast<const uint32_t*>(ddBuf));
^
cc1plus: all warnings being treated as errors
build/core/binary.mk:619: recipe for target '/home/media/android/system/out/target/product/honami/obj/STATIC_LIBRARIES/libziparchive_intermediates/zip_archive.o' failed
make: *** [/home/media/android/system/out/target/product/honami/obj/STATIC_LIBRARIES/libziparchive_intermediates/zip_archive.o] Error 1
make: *** Waiting for unfinished jobs....
external/speex/libspeex/resample.c: In function 'update_filter':
external/speex/libspeex/resample.c:605:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (j=0;j<st->filt_len;j++)
^
external/speex/libspeex/resample.c:686:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (j=0;j<st->magic_samples[i];j++)
^
external/speex/libspeex/resample.c:694:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (j=0;j<olen-1;j++)
^
external/speex/libspeex/resample.c:697:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (;j<st->filt_len-1;j++)
^
external/speex/libspeex/resample.c:704:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (j=0;j<st->filt_len-1+st->magic_samples[i];j++)
^
external/speex/libspeex/resample.c: In function 'speex_resampler_process_int':
external/speex/libspeex/resample.c:870:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(j=0;j<ichunk;++j)
^
external/speex/libspeex/resample.c:873:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(j=0;j<ichunk;++j)
^
external/speex/libspeex/resample.c: In function 'speex_resampler_process_float':
external/speex/libspeex/resample.c:926:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(j=0;j<ichunk;++j)
^
external/speex/libspeex/resample.c:933:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(j=0;j<ichunk;++j)
^
external/speex/libspeex/resample.c:943:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (j=0;j<ochunk+omagic;++j)
^
make: Leaving directory '/home/media/android/system'

#### make failed to build some targets (07:42 (mm:ss)) ####

7th September 2016, 01:09 AM |#1641  
Senior Member
Flag Kanpur
Thanks Meter: 277
 
Donate to Me
More
Hey any idea about this? Using Uber 4.9 for both toolchain and kernel. No other funny business. honami, cm-12.1

Quote:

art/compiler/dex/quick/dex_file_method_inliner.cc: In member function 'bool art:exFileMethodInliner::GenIntrinsic(art::Mir2L ir*, art::CallInfo*)':
art/compiler/dex/quick/dex_file_method_inliner.cc:508:1: error: insn does not satisfy its constraints:
}
^
(insn 2244 1443 1444 107 (parallel [
(set (regI 3 r3 [539])
(lshiftrtI (regI 2 r2 [orig:186 D.340824 ] [186])
(const_int 1 [0x1])))
(clobber (reg:CC 100 cc))
]) art/compiler/dex/quick/dex_file_method_inliner.cc:496 132 {arm_lshrdi3_1bit}
(expr_list:REG_UNUSED (reg:CC 100 cc)
(expr_list:REG_UNUSED (reg:SI 4 r4)
(nil))))
art/compiler/dex/quick/dex_file_method_inliner.cc:508:1: internal compiler error: in build_def_use, at regrename.c:1573
0x8119ea _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
../.././../gcc/gcc-UBER/gcc/rtl-error.c:109
0x811a11 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
../.././../gcc/gcc-UBER/gcc/rtl-error.c:120
0x7f0102 build_def_use
../.././../gcc/gcc-UBER/gcc/regrename.c:1573
0x7f0102 regrename_analyze(bitmap_head*)
../.././../gcc/gcc-UBER/gcc/regrename.c:715
0x7f0409 regrename_optimize
../.././../gcc/gcc-UBER/gcc/regrename.c:1830
0x7f0409 execute
../.././../gcc/gcc-UBER/gcc/regrename.c:1871
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [build/core/binary.mk:619: /run/media/haozeke/Storage/AndBuild/cm-12.1/out/target/product/honami/obj/SHARED_LIBRARIES/libart-compiler_intermediates/dex/quick/dex_file_method_inliner.o] Error 1
make: *** Waiting for unfinished jobs....

Post Reply Subscribe to Thread

Tags
justarchi archidroid optimizations linaro hack
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes