FORUMS
Remove All Ads from XDA

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

8,738 posts
Thanks Meter: 38,851
 
By JustArchi, Recognized Contributor / Recognized Developer on 18th May 2014, 02:38 AM
Post Reply Subscribe to Thread Email Thread
11th July 2016, 09:32 PM |#1631  
bigsupersquid's Avatar
Senior Member
Flag BFE, MO
Thanks Meter: 852
 
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)
Last edited by bigsupersquid; 12th July 2016 at 01:27 AM. Reason: add patches
The Following 6 Users Say Thank You to bigsupersquid For This Useful Post: [ View ] Gift bigsupersquid Ad-Free
 
 
12th July 2016, 06:40 AM |#1632  
PWn3R's Avatar
Senior Member
Flag Flagstaff
Thanks Meter: 599
 
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, 08:57 AM |#1633  
DorianX's Avatar
Senior Member
Flag Zapopan, Jalisco
Thanks Meter: 415
 
Donate to Me
More
Deleted...

Enviado desde mi Nexus 6P mediante Tapatalk
17th July 2016, 04:44 PM |#1634  
Senior Member
Thanks Meter: 250
 
More
all source code not found with 404 error.
ROM devs can't use your optimization
18th July 2016, 04:55 PM |#1635  
sagarshah1729's Avatar
Member
Flag Surat
Thanks Meter: 17
 
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?
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