Archive

Backtick Windows

ALT+0126 = ~

ALT+0096 = `

mergeDebugResources FAILED React Native

When you’re inside your project directory try using :

cd android && gradlew clean cd .. && react-native run-android

Accept Android SDK licenses from cli

The way to accept license agreements from the command line has changed. You can use the SDK manager which is located at: $ANDROID_HOME/tools/bin

e.g:
~/Library/Android/sdk/tools/bin

Run the sdkmanager as follows:
./sdkmanager --licenses

And accept the licenses you did not accept yet (but need to).

Docker recreate

Reset all containers and images (DANGER)
docker-compose rm --all && docker-compose pull && docker-compose build --no-cache && docker-compose up -d --force-recreate

Rebuild the container
docker-compose down && docker-compose up -d --build

Fix WiFi LG G5 misc partition

Command to safely get out of stuck TWRP would need to be updated for the G5:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc bs=256 count=1 conv=notrunc

that would help some people stuck in TWRP (wont help those stuck in download mode.. they should just successfully flash a TOT/KDZ to stop phone from booting into download mode). And it may not work in every instance but should work in many.

Here’s a 10-step MAC Fix (assuming you aren’t using the “temp” fix in /data/)

1. backup/dump your misc partition:
dd if=/dev/block/bootdevice/by-name/misc of=/sdcard/misc-dump.img
or if in TWRP with encrypted /data use:
dd if=/dev/block/bootdevice/by-name/misc of=/tmp/misc-dump.img
to dump to the /tmp/ directory.

2. pull misc-dump.img from phone onto computer.
adb pull /sdcard/misc-dump.img
or
adb pull /tmp/misc-dump.img

3. On computer, open up misc-dump.img in a hex editor.

4. After opening the misc-dump.img in the hex editor you’ll see the file in raw hex. Scroll down to offset 6000 for the Wifi MAC.
As seen in the picture below, the Wifi MAC is @ 6000h and is currently DE:AD:BE:EF:FE:ED, you will edit that section with your original MAC address instead (or current mac address you want to stick).

5. Now scroll down to offset 8000 for the Wifi MAC.
As seen in the picture below, the BT MAC is @ 8000h and is currently DE:AD:BE:EF:CA:FE, you will edit that section with your original MAC address instead (or current mac address you want to stick).

6. Save the edits made to the misc-dump.img. To be proper, select “Safe As..” instead of save and name the new file: misc-fixed.img

7. Push the fixed misc partition to your phone:
adb push /sdcard/misc-fixed.img
or
adb push /tmp/misc-fixed.img

8. Flash the misc-fixed.img on your phone to your misc partition:
dd if=/sdcard/misc-fixed.img of=/dev/block/bootdevice/by-name/misc
or
dd if=/tmp/misc-fixed.img of=/dev/block/bootdevice/by-name/misc

9. Reboot phone, or boot into Android if in TWRP. Wifi/BT MAC should now be fixed.

10. Save misc partitions just in case. Ideally you want an untouched misc partition before messing with anything on your phone.. sort of like backing up your EFS first. But worst case.. you can use the steps above to fix Wifi/BT MAC address issues.