Skip to content

Instantly share code, notes, and snippets.

@frsela
Last active August 29, 2015 14:14
Show Gist options
  • Save frsela/c4e117e5164152afa25d to your computer and use it in GitHub Desktop.
Save frsela/c4e117e5164152afa25d to your computer and use it in GitHub Desktop.
Enable Push traces on a Firefox OS device
echo "Enabling PushService traces on your FFOS connected device..."
AUXPATH=_____PUSH_____
echo "Getting OMNI.JA..."
adb pull /system/b2g/omni.ja .
mkdir $AUXPATH
cd $AUXPATH
unzip ../omni.ja
rm ../omni.ja
echo "Changing services.push.debug preference into defaults/pref/b2g.js ..."
sed -i 's/"services.push.debug", false/"services.push.debug", true/' defaults/pref/b2g.js
echo "Generating new OMNI.JA..."
zip ../omni.ja -r *
cd ..
echo "Updating OMNI.JA in the phone..."
adb shell stop b2g
adb remount
adb push omni.ja /system/b2g/omni.ja
adb shell ls -l /system/b2g
adb shell start b2g
rm omni.ja
echo "Cleaning..."
rm -rf $AUXPATH
echo "\o/ Done ! - Now use adb logcat | grep Push to see push traces"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment