Skip to content

Instantly share code, notes, and snippets.

View laleeroy's full-sized avatar
🤮
Covid strikes again!

jenkins laleeroy

🤮
Covid strikes again!
View GitHub Profile
@laleeroy
laleeroy / gist:babc95126960a7da8f3c0e278ecd3ac4
Created March 2, 2022 14:11 — forked from ThEMarD/gist:cd31bb69731ef004891b128832ed92c3
How to logcat Audio stuff from stock ROMs
Some stock ROMs don't want you using audio logcat level 7 which is required for the audio logs... so for that? You'll need to root your stock ROM with something like Magisk and then use adb with these commands:
adb shell
su
stop
setprop sys.init_log_level 7
logcat -G 4M
start
exit
First you'll need to clone acdb_extract. I used the one by J510-Dev which is originally based on the one by luca020400.
git clone https://github.com/J510-Dev/acdb_extract
Then, as the README says you must generate the acdb header. For Qualcomm devices? The stock audio hal would be audio.primary.msm8996.so which is found on my stock ROM from /system/lib/hw/audio.primary.msm8996.so which I could just copy into the acdb_get folder... so for example, I'd use this:
./generate_acdb_data.sh audio.primary.msm8996.so
which will generate a file called acdb_data.h which is needed for the next step.
Since acdb_extract doesn't require being built in the AOSP environment? You can just build it using...
@laleeroy
laleeroy / gist:e052b5138357905fcf2e3ffa8cd278cf
Created March 2, 2022 14:09 — forked from ThEMarD/gist:f3df65b91c8cf58c685a70b044060d7e
Older method to doing perfect kangs with extract-files.sh script
Create a dummy folder to Kang blobs like
device/dummy/dummy
Then copy proprietary-files.txt, extract-files.sh and setup-makefiles.sh from any device. A device that doesn't use a shared commonized device tree does make it easier.
Rename the stuff in the two .sh files to dummy as vendor and device name.
Update necessary proprietary-files in dunmy device tree for kang
Make sure the device's and/or commonized device proprietary-files are updated with the same blobs that you want in your proprietary vendor repo.
Next, to use the kang and section mode we need the switches "-k -s". -k tells extract-files to only kang/pull updated blobs without deleting any blobs. -s tells it to only update ones from a commented section of your proprietary-files.
for example, if i have this in my proprietary-files
# ADSP - from oneplus3t - OnePlus/OnePlus3/OnePlus3T:9/PKQ1.181203.001/1911042108 - OOS 9.0.6
vendor/lib/libadsp_hvx_callback_skel.so
vendor/lib/libadsp_hvx_stub.so