Skip to content

Commit

Permalink
Updated tweak-enable-debug-menu to be toggleable through configurator
Browse files Browse the repository at this point in the history
  • Loading branch information
j005u committed May 11, 2022
1 parent 338185c commit 8fe9784
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
**/ipk/*.ipk
*.ipk
**/ipk/tmp
**/ipk/data/*
*/libs
*/obj
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This simply allows you to inject your shared library into the vendor's service p

See the [debug menu enabler](tweak-enable-debug-menu/) for a full example of simple GUI lib method replacement (a NOP in this case) including a Makefile that will produce a complete .ipk for you.

In addition to the injectable library itself, you will also need to take care to update all the files in ipk/control/ with appropriate values for your library.
In addition to the injectable library itself, you will also need to take care to update all the files in ipk/control/ with appropriate values for your library. Note that the debug menu enabler project uses a dinit unit to allow the user to toggle the mod via configurator, located at ipk/data/opt/etc/dinit.d/tweak-enable-debug-menu and enables that unit during postinst.

## How this works
DJI's services (i.e. when you start something with `setprop dji.something_service 1`) are managed by Android init, which only reads it's config files once during bootup from the / ramfs before we ever have a chance to modify them.
Expand Down
1 change: 1 addition & 0 deletions ipk/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
data/*
1 change: 1 addition & 0 deletions tweak-enable-debug-menu/ipk/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
data/opt/etc/preload.d/
2 changes: 1 addition & 1 deletion tweak-enable-debug-menu/ipk/control/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: tweak-enable-debug-menu
Version: 0.1.0
Version: 0.1.1
Maintainer: Joonas Trussmann <[email protected]>
Description: Enable DJI debug menu on Goggles
Architecture: armv7-3.2
Expand Down
4 changes: 3 additions & 1 deletion tweak-enable-debug-menu/ipk/control/postinst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/system/bin/sh

modmanager enable diy_glasses enable_debug_menu
#modmanager enable diy_glasses enable_debug_menu
#we use dinit instead as this makes it configurator friendly out of the box
/opt/bin/dinitctl -u enable goggle-osd-dji
5 changes: 3 additions & 2 deletions tweak-enable-debug-menu/ipk/control/prerm
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/system/bin/sh

modmanager disable diy_glasses enable_debug_menu

#modmanager disable diy_glasses enable_debug_menu
#we use dinit instead as this makes it configurator friendly out of the box
/opt/bin/dinitctl -u disable goggle-osd-dji || true
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
type = scripted
command = modmanager enable diy_glasses enable_debug_menu
stop-command = modmanager disable diy_glasses enable_debug_menu

0 comments on commit 8fe9784

Please sign in to comment.