user1723095
user1723095

Reputation: 1219

How to rebuild optimized framework in Android

Let assume that I want to add logs in MediaHTTPConnection

Couple weeks ago I was just doing:

make -j8 framework

And then framework.jar was created, which I could push on rooted device.

However now I see that boot.art and boot.oat are created and framework.jar is more or less "empty" and useless. On the other hand I saw that I could build with:

DEXPREOPT_BOOT_JARS=false

and maybe it could fix my problem, however rebuilding whole project just to add some logs to framework doesn't look like smart idea ... So I would like to know if there is a way to somehow flash those new boot.art and boot.oat?

EDIT:

As stated above for now my workaround is rebuilding whole Android with flags that prevents dex optimization. Then I have normal framework.jar (couple MB instead of couple KB) which I can replace with framework build with the same flags. It's not so terrible (since I build whole project once) but still I would like to know better solution for that. Although I doubt it currently exists.

Upvotes: 1

Views: 1565

Answers (2)

Hitesh Sahu
Hitesh Sahu

Reputation: 45072

If ADB remount won't work:

# Script to mount Android Device as read/write.
# List the Devices.
adb devices;

# Run adb as root (Needs root access).
adb root;

# Since you're running as root su is not required
adb shell mount -o rw,remount /;

adb sync
adb shell start

Upvotes: 0

eurekabeacon
eurekabeacon

Reputation: 31

Perform the following:

mmm frameworks/base
adb remount
adb shell stop
adb sync
adb shell start

additional resources can be found here: http://devtcg.blogspot.in/2009/03/building-running-and-debugging-android.html

Upvotes: 1

Related Questions