Archive for » March, 2009 «

Monday, March 23rd, 2009 | Author: Tim

Your Ad Here

Easier than baking a cake!

Easier than baking a cake!

Currently working on some random things on the Android OS source - which of course if I can get my little, “additions”, to work properly I’ll be releasing them. Though I was having a few problems getting the code to compile - so I figured I’d throw together this post just in case anyone else is having similar trouble.

Essentially in the post I was originally reading here, stated the following;

At the time of writing, the Android Dream build was broken. I needed to do the following to make it work:
* Several (relatively minor) changes in the Dream audio driver code to fix compilation issues.
* Copied libOmxCore.so to mydroid/out/target/product/dream/system/lib (this was a missing step in the Building for Dream documentation, and something that should be in the HTC provided script)

Well that wasn’t the problem I was getting though — the erorr I had been getting was actually:

In file included from frameworks/base/libs/audioflinger/AudioResamplerCubic.cpp:20:
system/core/include/cutils/log.h:68:1: warning: this is the location of the previous definition
target thumb C++: libaudioflinger <= frameworks/base/libs/audioflinger/AudioFlinger.cpp
make: *** No rule to make target `out/target/product/dream/obj/lib/libaudio.so', needed by `out/target/product/dream/obj/SHARED_LIBRARIES/libaudioflinger_intermediates/LINKED/libaudioflinger.so'. Stop.
...
make: *** No rule to make target `/tmp/dream/target/product/dream/obj/lib/libcamera.so', needed by `/tmp/dream/target/product/dream/obj/SHARED_LIBRARIES/libcameraservice_intermediates/LINKED/libcameraservice.so'. Stop.
...
make: *** No rule to make target `/tmp/dream/target/product/dream/obj/lib/libOmxCore.so', needed by `/tmp/dream/target/product/dream/obj/SHARED_LIBRARIES/libopencorecommon_intermediates/LINKED/libopencorecommon.so'. Stop.
...
/media/other-storage/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/../lib/gcc/arm-eabi/4.2.1/../../../../arm-eabi/bin/ld: warning: librpc.so, needed by /tmp/dream/target/product/dream/obj/lib/libaudio.so, not found (try using -rpath or -rpath-link)
...
make: *** No rule to make target `/tmp/dream/target/product/dream/system/lib/libaudio.so', needed by `/tmp/dream/target/product/dream/system/lib/libaudioflinger.so'. Stop.
...
make: *** No rule to make target `/tmp/dream/target/product/dream/system/lib/libcamera.so', needed by `/tmp/dream/target/product/dream/system/lib/libcameraservice.so'. Stop.
...
make: *** No rule to make target `/tmp/dream/target/product/dream/system/lib/libOmxCore.so', needed by `/tmp/dream/target/product/dream/system/lib/libopencorecommon.so'. Stop.

(This list was compiled over multiple re-runs of make)

The simple fix was essentially what was stated in the original post, though it just took me a few minutes to figure this out. After running the locate command like a mad man and not finding anything on my developer machine, I finally reread *everything* and checked the device for the file - and there it was!

I just ended up throwing this into my extract-files.sh;
adb pull /system/lib/libaudio.so proprietary/libaudio.so
adb pull /system/lib/libcamera.so proprietary/libcamera.so
adb pull /system/lib/libOmxCore.so proprietary/libOmxCore.so
adb pull /system/lib/librpc.so proprietary/librpc.so
So my resulting file looked like this;

#!/bin/sh

mkdir -p proprietary
adb pull /system/etc/AudioFilter.csv proprietary/AudioFilter.csv
adb pull /system/etc/AudioPara4.csv proprietary/AudioPara4.csv
adb pull /system/etc/gps.conf proprietary/gps.conf
adb pull /system/bin/akmd proprietary/akmd
adb pull /system/lib/libhtc_ril.so proprietary/libhtc_ril.so
adb pull /system/lib/libaudioeq.so proprietary/libaudioeq.so
adb pull /system/lib/libqcamera.so proprietary/libqcamera.so
adb pull /system/lib/libaudio.so proprietary/libaudio.so
adb pull /system/lib/libcameraservice.so proprietary/libcameraservice.so
adb pull /system/lib/libcamera.so proprietary/libcamera.so
adb pull /system/lib/libOmxCore.so proprietary/libOmxCore.so
adb pull /system/lib/librpc.so proprietary/librpc.so
chmod 755 proprietary/akmd

adb pull /system/etc/wifi/Fw1251r1c.bin proprietary/Fw1251r1c.bin
adb pull /system/etc/wifi/tiwlan.ini proprietary/tiwlan.ini

libaudio.so, libcameraservice.so, libcamera.so, libOmxCore.so, librpc.so then needed to be copied over to TARGET/dream/target/product/dream/obj/lib/ and also to the locked folder TARGET/dream/target/product/dream/system/lib/

Ta-da! After approximately 10 runs, it finally compiled for me… Hopefully this helps anyone who ran into the same problems as me.

Friday, March 20th, 2009 | Author: Tim

Your Ad Here
With the (hopefully) eminent release of the cupcake update for the android os - this is supposed to be fixed with the addition of Settings.Secure; though I guess we won’t know until it gets released?

Anyway — basically you can modify system values in a specific database, so any program that calls Settings.System.Android_ID can be given any id of your choosing.

Just load up adb and navigate to the sqlite database: /data/data/com.android.providers.settings/databases/settings.db

Run the query;
select * from system;
You’ll see plenty of information which can then be changed;

Running the following;
update system set value=’dead00beef’ where name=’android_id’;
Would give you an ultra-slick android_id of dead00beef’ :)

Note that this will NOT change the android id used by google products since they use one that is linked to your gmail account that the phone is associated with…

Sunday, March 08th, 2009 | Author: Tim

Your Ad Here
So I was skimming through some code looking for some specifics when I ran across the following stuff in Settings;

        /**
         * Frequency in milliseconds at which we should sync the locally installed Vending Machine
         * content with the server.
         */
        public static final String VENDING_SYNC_FREQUENCY_MS = &quot;vending_sync_frequency_ms&quot;;

        /**
         * Support URL that is opened in a browser when user clicks on 'Help and Info' in Vending
         * Machine.
         */
        public static final String VENDING_SUPPORT_URL = &quot;vending_support_url&quot;;

        /**
         * Indicates if Vending Machine requires a SIM to be in the phone to allow a purchase.
         *
         * true = SIM is required
         * false = SIM is not required
         */
        public static final String VENDING_REQUIRE_SIM_FOR_PURCHASE =
                &quot;vending_require_sim_for_purchase&quot;;

        /**
         * The current version id of the Vending Machine terms of service.
         */
        public static final String VENDING_TOS_VERSION = &quot;vending_tos_version&quot;;

        /**
         * URL that points to the terms of service for Vending Machine.
         */
        public static final String VENDING_TOS_URL = &quot;vending_tos_url&quot;;

        /**
         * Whether to use sierraqa instead of sierra tokens for the purchase flow in
         * Vending Machine.
         *
         * true = use sierraqa
         * false = use sierra (default)
         */
        public static final String VENDING_USE_CHECKOUT_QA_SERVICE =
                &quot;vending_use_checkout_qa_service&quot;;

I located a few more interesting snippets - mainly about vending and requiring a sim card.

If there is anyone who is interested in testing some stuff out and has a dev/adp phone without a sim card - let me know. I’d be interested to see if a few patches I worked up would work :)