I wanted to remove "Personalize" from my ROM, as it was "Senseless" so I figured it out, but it can be used to remove anything such as HTC Software Update, which is useless to custom ROM users anyway. Here's how to do it with a very simple smali edit.
Step 1:
Decompile Settings.apk or classes.dex
Step 2:
Navigate to /com/android/settings/framework/activity/HtcEntryProxy.smali
Step 3:
Open HtcEntryProxy.smali in your favorite editor and search for the lines
Code:
# direct methods
.method static constructor <clinit>()V
Step 4:
The fun begins here. I'm going to use "Personalize" as an example since it's what I removed, but you'll notice stuff like:
Code:
.line 167
sget v0, Lcom/android/settings/framework/activity/HtcEntryProxy;->INDEX:I
add-int/lit8 v1, v0, 0x1
sput v1, Lcom/android/settings/framework/activity/HtcEntryProxy;->INDEX:I
sput v0, Lcom/android/settings/framework/activity/HtcEntryProxy;->PERSONAL_INDEX:I
Pay close attention to this specific line:
Code:
add-int/lit8 v1, v0, 0x1
What you want to do from here is change 0x1 to 0x0. You can do this for anything you want to remove.
Code:
add-int/lit8 v1, v0, 0x0
Step 5:
Save your file and recompile Settings.apk or classes.dex and push to phone with ADB or create a flashable zip. If you're going to push to phone, I would suggest doing it from recovery as opposed to while in Android. A system file like Settings.apk probably won't want to be interrupted during an active Android session. Reboot your phone when done.
Step 6:
Profit.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Enjoy.
Awesome guide! Thanks! Can this method be used to launch other APKs? I'm assuming so since you have the extended settings app in there or is that just a hook into the framework?
Ive been looking for a guide about changing the menus. Thanks
Cabe24i said:
Awesome guide! Thanks! Can this method be used to launch other APKs? I'm assuming so since you have the extended settings app in there or is that just a hook into the framework?
Click to expand...
Click to collapse
It's a bit more involved to do what you're thinking but certainly doable. Not really this way though.
XsMagical said:
Ive been looking for a guide about changing the menus. Thanks
Click to expand...
Click to collapse
No problem!
Excellent work man!
freeza your the man.
How would I go about removing a quick setting?
Via My HTC Evo 3D On The Now Network From Sprint.
Rydah805 said:
How would I go about removing a quick setting?
Via My HTC Evo 3D On The Now Network From Sprint.
Click to expand...
Click to collapse
remove it from the quicksettings.xml
WOW, just amazing. I asked about doing this long ago in the Hero days and nobody had an answer. I applaud you for figuring it out. Maybe it is time to build my personal Hero Rom again, since this was the only thing causing me a headache (I still have the Hero for messing around on).
JoelZ9614 said:
remove it from the quicksettings.xml
Click to expand...
Click to collapse
Thank you, where is that located? Sorry, and thanks again.
Via My HTC Evo 3D On The Now Network From Sprint.
Rydah805 said:
Thank you, where is that located? Sorry, and thanks again.
Via My HTC Evo 3D On The Now Network From Sprint.
Click to expand...
Click to collapse
systemui.apk
JoelZ9614 said:
systemui.apk
Click to expand...
Click to collapse
Thanks ah mill
Via My HTC Evo 3D On The Now Network From Sprint.
I found quicksettings.xml and edited how I wanted, but I'm having issues recompiling. Could somebody hook me up?
Here's my SystemUI.apk:
http://db.tt/OzPTMQay
Here's a list of the order I wanted the quick settings in also: (removed WiFi Tether)
WiFi
Mobile Network
4G
Bluetooth
GPS
Volume
Brightness
Rotation
Task Manager
All Settings
Via My HTC Evo 3D On The Now Network From Sprint.
Rydah805 said:
I found quicksettings.xml and edited how I wanted, but I'm having issues recompiling. Could somebody hook me up?
Here's my SystemUI.apk:
http://db.tt/OzPTMQay
Here's a list of the order I wanted the quick settings in also: (removed WiFi Tether)
WiFi
Mobile Network
4G
Bluetooth
GPS
Volume
Brightness
Rotation
Task Manager
All Settings
Via My HTC Evo 3D On The Now Network From Sprint.
Click to expand...
Click to collapse
actually you might want to change the androidvisibility:none instead of just deleteing then
JoelZ9614 said:
actually you might want to change the androidvisibility:none instead of just deleteing then
Click to expand...
Click to collapse
If you have a sec could you do it, please. Turned the MAC off to put these crazy kids asleep. No worries if you can't. Thanks.
Via My HTC Evo 3D On The Now Network From Sprint.
Hello!
I reed your tutorial : http://forum.xda-developers.com/showthread.php?t=1357762
Please, can you help me?
I have samsung Galaxy S4 JB 4.3 and I need to remove some entry in settings. But I do not find in secSettings/smali your values...
Can you help me?
Thank You!
Related
MotoCharge
The App MotoCharge displays die battery charge of Motorola Defy (and afaik also for Milestone 2, maybe more phones) in a 1% stepping. It is also able to show the battery status, temperature and voltage, just pull down the status bar. In case you are using a status bar in black, you can change the text color to white. More features to come
I give the app away for free here in the forums. But in case you want to donate a little for my work, feel free to buy it from the market. (it costs 50 euro cents, I don't know how much that is in $$$ cent, but it should be around 60..)
Bug reports and feature requests in this Thread
Download here: http://dl.dropbox.com/u/1464041/Plain/MotoCharge.apk
(this will be a link as soon as I am allowed to post links)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
You sir, are a legend.
Thanks for the app. Works great!
Great work! More font color options in next update please
Big thanks man ! exactly what i needed ...now i can uninstall defybat & batteryminder
could u make in future version to also display % not just the number ...and big thanks for this app is the free version on market aswell? couldnt find it
glad you guys like it
"is the free version on market aswell?"
- no. it is just available here for free, sorry
"could u make in future version to also display % not just the number"
- sure. i will include an option for that!
"More font color options in next update please"
- ayeaye! i just need to find a more storage friendly way to do so
Great app - nice one
Would you be able to change the font style & size so that it looks a bit more like the Motorola digital clock that's also in status bar
Thanks.
sp8y said:
Would you be able to change the font style & size so that it looks a bit more like the Motorola digital clock that's also in status bar
Click to expand...
Click to collapse
sure. does anyone know where i can get the font or what it is called?
I've had a quick search & not sure if it's the same but "droid sans" looks to be similar or even the same as the standard clock font.
sp8y said:
I've had a quick search & not sure if it's the same but "droid sans" looks to be similar or even the same as the standard clock font.
Click to expand...
Click to collapse
i played a bit with the font. it is def the right one, but maybe i need to displace the numbers a little bit downwards, it is not in line with the clock ;(
anyways, check out if you like the new version more
Yes that's great - looks much better - as you said it maybe could move down slightly but that's just a minor point for me.
As mentioned by a previous member a % icon would also look great alongside the numbers.
From my point of view you've done a nice job & I particularly like the way you can view the batt temp & voltage without having to see them all the time.
Thanks
if everyone really wants the % that hard, i can totally implement that. but i just tested it on my defy and the numbers are getting very very tiny that way. i will have to think more about that
i could make the icon wider than 35px, i have to try that later..
zorgblaubaer said:
if everyone really wants the % that hard, i can totally implement that. but i just tested it on my defy and the numbers are getting very very tiny that way. i will have to think more about that
i could make the icon wider than 35px, i have to try that later..
Click to expand...
Click to collapse
ty... but make a radio button for % display if maybe anyone don't want it.
(and color themes )
Hello
I just modify StatusBarPolicy.smali for don't show time, i think it's possible to make that for battery, for that i think it's nécessary to modfy this line :
.line 615
iget-object v3, p0, Lcom/android/server/status/StatusBarPolicy;->mBatteryData:Lcom/android/server/status/IconData;
invoke-virtual {p2, v3, v7}, Lcom/android/server/status/StatusBarService;->addIcon(Lcom/android/server/status/IconData;Lcom/android/server/status/NotificationDataLandroid/os/IBinder;
move-result-object v3
iput-object v3, p0, Lcom/android/server/status/StatusBarPolicy;->mBatteryIcon:Landroid/os/IBinder;
.line 896
iget-object v3, p0, Lcom/android/server/status/StatusBarPolicy;->mService:Lcom/android/server/status/StatusBarService;
iget-object v4, p0, Lcom/android/server/status/StatusBarPolicy;->mBatteryIcon:Landroid/os/IBinder;
iget-object v5, p0, Lcom/android/server/status/StatusBarPolicy;->mBatteryData:Lcom/android/server/status/IconData;
const/4 v6, 0x0
invoke-virtual {v3, v4, v5, v6}, Lcom/android/server/status/StatusBarService;->updateIcon(Landroid/os/IBinder;Lcom/android/server/status/IconData;Lcom/android/server/status/NotificationDataV
For that this post can help : http://forum.xda-developers.com/showthread.php?t=780614
So can you add icon like that ?
http://forum.xda-developers.com/showthread.php?t=724778
I know this tools but i don't like to show just number .And i don't like to have two battery indicator
Thanks
Going to try that outnow!
great app,good job
Great app, but every time i open my phone it opens the app and shows the black screen where it asks about the black or white status bar
yeah i know, sorry about that. I am still trying to find out how to make the settings activity not show up when the app loads...
karx23 said:
Great app, but every time i open my phone it opens the app and shows the black screen where it asks about the black or white status bar
Click to expand...
Click to collapse
I'm I reading this correct that you are trying to add the option to replace the stock battery status icon with yours or the %? If so this is great! I don't see a reason to have 2 battery status indicators in the notification bar.
Thanks for your work
gramps50 said:
I'm I reading this correct that you are trying to add the option to replace the stock battery status icon with yours or the %? If so this is great! I don't see a reason to have 2 battery status indicators in the notification bar.
Click to expand...
Click to collapse
no sorry man, that is not what i am working at
what i meant is that i am trying to prevent the settings windows from showing up when the app starts.
i dont think it is possible for a normal app to hide the systems battery indicator (maybe it is possible with su? maybe i will look into that after exams)
...
Great app, but this "annoying window popping-up at every boot is annoying", ya?
It really looks like the HP printer crapware :S
Is there a white status bar theme for the thunderbolt yet?
xCHPx said:
Is there a white status bar theme for the thunderbolt yet?
Click to expand...
Click to collapse
Check out the lightning rom thread on pg48 or 49, I am working on getting it worked out and I posted the progress on it as of now...it should be done as soon as I get a couple more things worked out.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
dhemke17 said:
Check out the lightning rom thread on pg48 or 49, I am working on getting it worked out and I posted the progress on it as of now...it should be done as soon as I get a couple more things worked out.
Click to expand...
Click to collapse
perfect. will definitely check it out.
Yeah I would like something like this with das BAMF.
I'm currently trying to find out how to changethe text color to black, so I can have a white theme.
eraursls1984 said:
I'm currently trying to find out how to changethe text color to black, so I can have a white theme.
Click to expand...
Click to collapse
When you find that out let me know...I know where to change the color...I just dont know what to change it to to get black. its in the service.jar...
eraursls1984 said:
I'm currently trying to find out how to changethe text color to black, so I can have a white theme.
Click to expand...
Click to collapse
Got the text black on mine
dhemke17 said:
Got the text black on mine
Click to expand...
Click to collapse
Care to share? I haven't been able to put as much time into it lately, my wife is giving me hell over the time I've already spent on it.
eraursls1984 said:
Care to share? I haven't been able to put as much time into it lately, my wife is giving me hell over the time I've already spent on it.
Click to expand...
Click to collapse
go check in the "Vanilla Bean" ROM thread. this guys started it. Maybe you could compare services.jar? or just rip it completely... with credit to him of course.
Certainly! Sorry. Haven't had much time over here....
1. Text pop ups...use the UOT kitchen put just modify statusbar, set the way you want and MAKE SURE YOU CHANGE text color to 000000.
2. As for the clock...pull classes.dex from services.jar and decompile using baksmali. Navigate to Android/status/status bar notification its a line right around .line 69 that initially reads
const/16 v17, -0x1
CHANGE THIS LINE TO
const/high16 v17, -0x100
Recompile classes.dex with small, replace it in services.jar and push push it to your phone or road it in a theme and you are good to go.
Sent from my ADR6400L using XDA Premium App
THANK GOD!
dhemke17 said:
Certainly! Sorry. Haven't had much time over here....
1. Text pop ups...use the UOT kitchen put just modify statusbar, set the way you want and MAKE SURE YOU CHANGE text color to 000000.
2. As for the clock...pull classes.dex from services.jar and decompile using baksmali. Navigate to Android/status/status bar notification its a line right around .line 69 that initially reads
const/16 v17, -0x1
CHANGE THIS LINE TO
const/hight16 v17, -0x100
Recompile classes.dex with small, replace it in services.jar and push push it to your phone or road it in a theme and you are good to go.
Sent from my ADR6400L using XDA Premium App
Click to expand...
Click to collapse
THANK YOU!!!!!! Finally! I've been working on this here without much luck.
btw...it's high16, not hight16 Teach me not to copy/paste.
Heres a mod to remove the Ongoing Wifi Notification. You have to be unlocked and have a custom recovery.
Step 1 : Download
Step 2: Flash via Recovery
Step 3: Reboot and Enjoy!
Thanks to dsb9938 for his flashable zip!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Well this is going to be the first thing i flash once we get unlock.
W00t
Ugh....what a tease...lol.
There already is an option in settings to turn it off. Settings/WiFi then menu and advanced
Sidewind75 said:
There already is an option in settings to turn it off. Settings/WiFi then menu and advanced
Click to expand...
Click to collapse
No.. No there isn't..
Sent from my DROID DNA
Can't wait for this. The constant WiFi notification even when disconnected drives me nuts.
Sent from my HTC Droid DNA
I just dug into the menu finally and am just happy that it lets me get rid of that annoying screen that pops up every time I open an app... And it takes off auto Wi-Fi also
Sent from my HTC DNA
two_cents said:
I just dug into the menu finally and am just happy that it lets me get rid of that annoying screen that pops up every time I open an app... And it takes off auto Wi-Fi also
Sent from my HTC DNA
Click to expand...
Click to collapse
But it still doesn't turn off the one in notifications. Which is the point.
D
.
dsb9938 said:
But it still doesn't turn off the one in notifications. Which is the point.
D
.
Click to expand...
Click to collapse
yes I know but thats not as big of a deal to me as everytime I open an app out around town on 4g the whole screen was filled up with it trying to force me onto wifi
It says the file has been removed
I just got unlock, recovery and root and came straight here to be happy and flash this, then disappointed by a file not found message.... :'(
Sent from my HTC6435LVW using Tapatalk 2
Sorry guys, link is working again.
Here is the proper link:
https://www.dropbox.com/s/kp0nr2532scxasf/wifinotificationremover.zip
TheBiles said:
Here is the proper link:
https://www.dropbox.com/s/kp0nr2532scxasf/wifinotificationremover.zip
Click to expand...
Click to collapse
lol okay now its fixed!
I ran this followed by the debloat (v3) script, and now I have no htc widgets.
I have attached an undo for the wifi notification removal, although it has not fixed my widgets issue.
Worked great thanks!!
Not an iPhone.....
thenks men
Thanks, I really don't like wasting space on information I don't want or need This worked great, and right up my ally... nice and easy
Any chance some one can make a zip to get rid of the N icon from the nfc being enabled?
Sent from my Nexus 7 using Tapatalk 2
dot45 said:
I ran this followed by the debloat (v3) script, and now I have no htc widgets.
I have attached an undo for the wifi notification removal, although it has not fixed my widgets issue.
Click to expand...
Click to collapse
There was an earlier version of the De-Bloat script that removed ShowMe.apk,.odex and HTC_Widget_ShowMe.apk,.odex which causes the HTC widgets to be hidden from adding them. Sounds like you may have run the earlier version. I recommend first try flashing the "Fix" zip file on that post, and if still nothing, post in that thread, the Dev that made the script is really responsive and can likely help you out.
As promised in my ukb thread, here is an independent zip flash for the mod to activate the ability to change the mapping of the "recents" button
changes settings.apk
turns verizon specific flag to on that otherwise excludes the mod
works on stock deodex
should work on odex replacing settings.apk and settings.odex with deodexed apk only (reported as working)
****this will not give you a menu on rosie homescreen....that is a different mod, though it requires this mod to work***
Download
***Feel free to include this in your rom/project, just properly credit, thanks!
For 2.04 Verizon 2/15 OTA
button_mod_2.04.zip: http://www.androidfilehost.com/?fid=9390288116658474820
md5: 10ebdf27969415d6a90e8591b33024e0
For 1.15 Verizon Release Software:
button_mod_1.zip: http://www.androidfilehost.com/?fid=9390225151984926744
mirror: http://d-h.st/9N5
MD5sum: 525215760058b1941d5a3bd5469fccf6
***if you found the mod useful, just click the thanks button
Code Changes for Developers:
decompile the settings.apk (if deodexed) the changes are in the classes.dex (smali) so if you are trying to do it on the odexed version, you ll need to baksmali the settings.odex file....im not gonna hold your hand and explain that to you
navigate to:
com/android/settings/framework/flag/feature/HtcDisplayFeatureFlags.smali
find this method:
Code:
.method public static supportRecentAppsButton
wholesale change the method to this:
Code:
.method public static supportRecentAppsButton(Landroid/content/Context;)Z
.locals 1
const/4 v0, 0x1
return v0
.end method
(i did this differently in the 1.15 version, but this is simpler)
Screenshots
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Running stock rooted odex ... works fine! Thanks :good:
This looks awesome!
JWhetstone02 said:
Running stock rooted odex ... works fine! Thanks :good:
Click to expand...
Click to collapse
im outta thanks for the day , but thanks for the report
Flashed this in recovery and now I don't have settings. When I try to select settings from the notification field it does nothing. I'm rooted on CODIS
nitsuj17 said:
im outta thanks for the day , but thanks for the report
Click to expand...
Click to collapse
Tapatalk give you unlimited thanks
Sent from my Team 420 themed HTC Droid DNA
---------- Post added at 04:22 PM ---------- Previous post was at 04:21 PM ----------
Apex i ITR said:
Flashed this in recovery and now I don't have settings. When I try to select settings from the notification field it does nothing. I'm rooted on CODIS
Click to expand...
Click to collapse
Codis already had it.
Sent from my Team 420 themed HTC Droid DNA
damnit, now i HAVE to root! so lazy though..lol.. why couldn't HTC have put this in stock?!!?? ugh.
earthrocker said:
damnit, now i HAVE to root! so lazy though..lol.. why couldn't HTC have put this in stock?!!?? ugh.
Click to expand...
Click to collapse
There's actually an exclusion made for verizon phones coded in, which is why it doesn't shoe up stock
HTC/vzw went out of their way to remove it for us lol
I just activated it after digging around to understand why it was happening and found why
nitsuj17 said:
There's actually an exclusion made for verizon phones coded in, which is why it doesn't shoe up stock
HTC/vzw went out of their way to remove it for us lol
I just activated it after digging around to understand why it was happening and found why
Click to expand...
Click to collapse
I wonder why Verizon didn't want that. Why does Verizon care so much about what we do to our device. We purchase the device so we should be allowed to use it to its full potential, right?
Sent from my Team 420 themed HTC Droid DNA
Just flashed. Amazing! So nice to see fewer three dot menus around this phone. Nits, thanks a million.
Sent from my HTC6435LVW using xda app-developers app
So for stock rooted odex do I extract the .zip and get the .apk and replace in system/apps or just flash like I would if I were on a deodexed rom?
Never mind I got it, tried it both ways. Got it by flashing!! Thanks for the mod, works perfectly!!!!
Great Mod! Worked like a charm...rooted, stock, odex with cubed 1.4.9 kernel
The genius of this is it makes the DNA an even more one handed phone for me...as it was annoying that on most apps the on screen menu button was top right, especially web browsing
With the hard button remapped to menu, the right thumb can do all!! (especially with swipe to wake/off with the 1.4.9 cubed kernel).
nitsuj17 said:
There's actually an exclusion made for verizon phones coded in, which is why it doesn't shoe up stock
HTC/vzw went out of their way to remove it for us lol
I just activated it after digging around to understand why it was happening and found why
Click to expand...
Click to collapse
it's just crazy, man. i don't understand why they do this crap. typical verizon, though. just a way for them to show us that they own us lol
Well I am rooted on codis and of course now I have no settings either. Didn't think it was already in my settings. Is there any easy way to get this back?
earthrocker said:
it's just crazy, man. i don't understand why they do this crap. typical verizon, though. just a way for them to show us that they own us lol
Click to expand...
Click to collapse
And then the devs step in and own Verizon
Sent from my HTC6435LVW using Tapatalk 2
Stock, rooted, odex.
Cannot get menu regardless of setting in "Settings."
Flashed mod and pushed the apk.
Any thoughts?
androg421 said:
Stock, rooted, odex.
Cannot get menu regardless of setting in "Settings."
Flashed mod and pushed the apk.
Any thoughts?
Click to expand...
Click to collapse
you will *not* get a rosie menu regardless of this mod or not
you will get it in apps however
htc removed the code for menu from Rosie...you ll need to be on a rom that has that mod
nitsuj17 said:
you will *not* get a rosie menu regardless of this mod or not
you will get it in apps however
htc removed the code for menu from Rosie...you ll need to be on a rom that has that mod
Click to expand...
Click to collapse
Thanks for the mod and the explanation!
I seem to recall reading about the "code removed from Rosie." I should say "duh" here, but it would clearly be redundant. :laugh:
Re: {Mod}Display, gestures & buttons
Can u post the code for the fix? We need update for the ota. Thanks
Sent from my HTC6435LVW using Tapatalk 2
(Sorry, I just realized this should be in Q&A and not General)
Hi there fellow Android enthusiasts.
Recently I bought a Bebop 2 drone, which is quite fun to play around with. After a couple of flights I noticed that
the max altitude of this device is 150m (492.12ft). I dug through a couple of threads on the Parrot forum about increasing
past this limit and somewhere I've read that the limitation is build into the piloting app.
So I decompiled the app with an app called ShowJava, I searched through the generated sources for strings like "MAX_ALTITUDE" and "150.0".
After some digging I found the following interesting file.
com.parrot.freeflight3/java/com/parrot/freeflight/piloting/model/bebop/BebopPreset.java which has a static final:
Code:
MAX_ALTITUDE_STATE = DoubleBoundedState.createFromValue(ExponentialBackOffPolicy.DEFAULT_RANDOMIZATION_FACTOR, 30.0d, 150.0d);
DoubleBoundedState is a class found in com.parrot.freeflight3/java/com/parrot/freeflight/util/DoubleBoundedState.java and it looks like a wrapper class that has 3 fields of the type Double, mCurrentValue; mMaxBound; and mMinBound; (thank "God" for proper named of fields). The wrapper class has a "constructor" createFromValue which takes 3 arguments: double minBound, double currentValue, double maxBound. After digging through some more code I found out that DEFAULT_RANDOMIZATION_FACTOR has the value of 0.5, so this is the lowest altitude value that can be set in the UI and it can be found in /sources/com.parrot.freeflight3/java/com/google/api/client/http/ExponentialBackOffPolicy.java.
So.... we could conclude that the 150.0d is 100% certain the max altitude value, which is hardcoded into the piloting. As far as I can see it's only in that 1 file (BebopPreset.java).
This is the point where I could use some help, what I did after all that was decompile the apk file with apktools and looked at the smali file (I have no experience with smali files):
Code:
.line 14
const-wide v8, 0x4062c00000000000L # 150.0
move-wide v4, v12
move-wide v6, v2
invoke-static/range {v4 .. v9}, Lcom/parrot/freeflight/util/DoubleBoundedState;->createFromValue(DDD)Lcom/parrot/freeflight/util/DoubleBoundedState;
move-result-object v0
sput-object v0, Lcom/parrot/freeflight/piloting/model/bebop/BebopPreset;->MAX_ALTITUDE_STATE:Lcom/parrot/freeflight/util/DoubleBoundedState;
So I think const-wide v8, 0x4062c00000000000L # 150.0 is the line I would want to edit?
Luckely in that same settings screen in the app is a maximum distance which is 2km (2000.0d)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
and in the smali file that's the entry right underneath the one I want to edit. It looks like this.
Code:
.line 15
const-wide v4, 0x409f400000000000L # 2000.0
const-wide v6, 0x409f400000000000L # 2000.0
move-wide v2, v14
invoke-static/range {v2 .. v7}, Lcom/parrot/freeflight/util/DoubleBoundedState;->createFromValue(DDD)Lcom/parrot/freeflight/util/DoubleBoundedState;
move-result-object v0
sput-object v0, Lcom/parrot/freeflight/piloting/model/bebop/BebopPreset;->MAX_DISTANCE_STATE:Lcom/parrot/freeflight/util/DoubleBoundedState;
So I tried to change the value 0x4062c00000000000L for the value 0x409f400000000000L in the hope I would see 2000 in the UI instead of 150. But after rebuilding the apk and signing it I still see 150 as a max. Who can and wants to help me change this smali file in the correct manner?
Also, you might have noticed I have the java classes so you might ask "why don't you build them?", believe me, I tried. But android studio makes a mess out of the project and refuses to build it. Many thanks in advance for any input.
UPDATE:
Looks like overwriting that value was enough, the drone keeps the 150 somewhere as well, as soon as I connect with the drone the max altitude changes to 150 again so I guess I will have to patch the drone to.
I had seen many times people reply to this question vaguely with "You can override max altitude 150 of the Bebop 1 or 2 using Flight Plan", but it is never accompanied with instructions. The Waypoint Altitude Slider maxed at 150 meters. Well, tonight I randomly saw a video with some basic Flight Plan how-to info. The content creator showed that if you ling-press on an existing Waypoint in Flight Plan, you get a box that asks if you want to EDIT the waypoint or TRASH it. If you click the EDIT button for that waypoint, you get a numerical data entry box and you can manually enter the altitude for that waypoint. The video maker entered something like 90, but I'm more subversively-minded (in theory) and I also own a Bebop 2 and I have a paid license for Flight Plan. So I popped open Free Flight Pro, picked a random point in a flight plan, lonng-pressed on it, clicked the magical new EDIT button, and entered the number 500. Clicked the check mark button to confirm. Voila! The Waypoint I'd edited was now solid red, and showed 500m.
If I lived in a country other than the U.S.A. I would have already tested it to see if it worked. I can't legally test it, and I do like be in a populated area. If someone would let me know if this works, please, I would live to know!! TIA
Jerry911 said:
Looks like overwriting that value was enough, the drone keeps the 150 somewhere as well, as soon as I connect with the drone the max altitude changes to 150 again so I guess I will have to patch the drone to.
Click to expand...
Click to collapse
I bellieve the limit you found inside the app only applies when flying with the on-screen controls and without Skycontroller. In fact, you can fly BB2 with a SC2 while the FFpro device is unplugged, so any app-restriction would not apply either. Therefore, the control signals go straight from SC2 to BB2. The relevant altitude limit is most probably applied by the drone’s code. However, this does not yet explain how 3rd party apps like Auriga or Bebop Pro are able to bypass the limit...