Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 03-12-2012, 11:39 AM   #16
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
And how about creating a waf menu?
Let me explain this:
in the end, the browser is a WAF itself and it has his own menu. So it could be possibile to create one for any WAF. It could be used to kill it, to access Yifan Lu launcher...
Am I dreaming?
silver18 is offline   Reply With Quote
Old 03-12-2012, 11:48 AM   #17
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Yes

You obviously *can* have your own menu in a WAF app (check the browser's implementation for details), but this won't allow you to gain more privileges. You won't be able to run commands etc.
This makes sense, because otherwise, that would essentially mean giving full root control to a WAF application, which would be a gaping security hole.

The only way that I *think* you can interact with the system is via LIPC. I haven't taken a deeper look into this, but do some "grep -ir lipc" inside the WAF and pillow directories and see how it's used. Good luck

PS: There is no exit button. The exit button is the home button. This is true even for the bundled WAF apps (e.g., browser): If you start the browser, you can only exit it by returning to the home screen. If you look at the list of running applications, you will see that the browser is still running in the background after you "exited". I think it will only be killed once another WAF app is started.

Last edited by ixtab; 03-12-2012 at 11:52 AM.
ixtab is offline   Reply With Quote
Advert
Old 03-12-2012, 02:49 PM   #18
JustAMan
Groupie
JustAMan doesn't litterJustAMan doesn't litter
 
JustAMan's Avatar
 
Posts: 153
Karma: 113
Join Date: Jan 2012
Location: Russia
Device: Kindle Touch
Then maybe there's no need to kill itself? Let this WAF app live till another WAF starts...
JustAMan is offline   Reply With Quote
Old 03-12-2012, 03:17 PM   #19
dasmoover
Connoisseur
dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.
 
Posts: 84
Karma: 26720
Join Date: Mar 2011
Device: Kindle 3 WIFI
My WAFbrew apps kills the WAF process on start so you can modify files on the fly and see the results without rebooting.


wafbrew.sh -

Quote:
#/bin/sh
WAF=$1
killall wafapp
umount /var/local/waf/sample
mount --bind /mnt/us/waf/$WAF /var/local/waf/sample
lipc-set-prop com.lab126.appmgrd start app://com.lab126.sample
dasmoover is offline   Reply With Quote
Old 03-15-2012, 12:05 PM   #20
thatworkshop
hub
thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.
 
thatworkshop's Avatar
 
Posts: 715
Karma: 2151032
Join Date: Jan 2012
Location: Iranian in Canada
Device: K3G, DXG, Kobo mini
Quote:
Originally Posted by JustAMan View Post
Then maybe there's no need to kill itself? Let this WAF app live till another WAF starts...
For browser it makes sense, I like to be able to see the last page I looked at... but for other WAF apps, I think their processes should be killed as soon as back button is pressed! I don't like to have their processes running till next WAF kicks in.

Does anyone know how to revert it back so that nativeBridge.dbgCmd() can work?

Last edited by thatworkshop; 03-15-2012 at 12:35 PM.
thatworkshop is offline   Reply With Quote
Advert
Old 03-15-2012, 01:45 PM   #21
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Reset your device to a 5.0.0 or 5.0.1 firmware and never, ever, upgrade.

nativeBridge.debugCmd() is a major bug and a security hole, IMHO.
ixtab is offline   Reply With Quote
Old 03-31-2012, 12:02 PM   #22
aditya3098
Guru
aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.
 
Posts: 608
Karma: 1588610
Join Date: Jan 2012
Device: Kindle Scribe
If I am not mistaken, there is a way to access appmgrd from JS?
After entering
Code:
sqlite3 /var/local/appreg.db "INSERT INTO "properties" VALUES('com.killall.wafapp','command','/usr/bin/killall wafapp');"
into the ssh terminal, I am able to use
Code:
lipc-set-prop com.lab126.appmgrd start app://com.killall.wafapp
to kill wafapp! So if we put those two together.........
aditya3098 is offline   Reply With Quote
Old 04-10-2012, 11:07 AM   #23
aditya3098
Guru
aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.
 
Posts: 608
Karma: 1588610
Join Date: Jan 2012
Device: Kindle Scribe
Well...................
aditya3098 is offline   Reply With Quote
Old 04-10-2012, 11:18 AM   #24
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
I think it should work...but...you can't use this:

Code:
lipc-set-prop com.lab126.appmgrd start app://com.killall.wafapp
from inside a waf (IMO....It could be possible, though)
silver18 is offline   Reply With Quote
Old 04-10-2012, 05:28 PM   #25
mr.w0lf
n00b
mr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with others
 
Posts: 58
Karma: 2802
Join Date: Jan 2012
Device: Kindle Touch
I'm a bit tired so maybe I am saying something (more) stupid (than usual)..

Amazon removed nativeBridge.dbgCmd, but why not find out how it was working and making a sobstitute for it, maybe giving the user the choice if allow root access or not? (like superuser on android)
mr.w0lf is offline   Reply With Quote
Old 04-10-2012, 09:10 PM   #26
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by mr.w0lf View Post
I'm a bit tired so maybe I am saying something (more) stupid (than usual)..
Ummm.... I'm afraid that you're right

Quote:
Originally Posted by mr.w0lf View Post
Amazon removed nativeBridge.dbgCmd, but why not find out how it was working and making a sobstitute for it, maybe giving the user the choice if allow root access or not? (like superuser on android)
This was previously working precisely because there was functionality inside a system application (wafapp IIRC, but don't quote me on that; it may have been a library as well) which deliberately allowed to break out of "protected" javascript mode into native mode. This is commonly known as a "security hole", and the mechanism is commonly known as an "exploit". Amazon has closed the security hole so that this exploit is no longer possible.

Of course, you can write a substitute for this. You can even replace the entire webkit library. Or the Operating system.

The real challenge is to write something that allows you to perform additional functionality (ideally) on an unmodified device, or (second choice) that works on a modified device, while still not causing problems on an unmodified one.

If you're serious about this, then I suggest to take a look at the waf application and libraries, followed by the LIPC mechanisms.
ixtab is offline   Reply With Quote
Old 05-19-2012, 09:25 AM   #27
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Looking around in /usr/share/webkit-1.0/pillow/javascripts, I found that many JS call nativeBridge.
Something drew my attention:

Code:
nativeBridge.setTitleBarWinParams({forceVisible: true});
and similar:

Code:
nativeBridge.setTitleBarWinParams({forceVisible: false});
but there are lots of usefull things.

The point is: as nativeBridge is here used in a JS, is it possible to make the same from a WAF?
I tried in my WAF, but no luck... (something tells me it isn't possible!)

EDIT: Thanks to Geekmaster!!!

Last edited by silver18; 05-19-2012 at 11:53 AM.
silver18 is offline   Reply With Quote
Reply


Forum Jump


All times are GMT -4. The time now is 12:02 PM.


MobileRead.com is a privately owned, operated and funded community.