• April 27, 2024, 11:40:38 am

Author Topic: Reboot/Shutdown the device (nice for copy protection)  (Read 3368 times)

0 Members and 1 Guest are viewing this topic.

Offline huellif

  • Developer
  • Christmas Santa
  • ****
  • Posts: 402
  • Reputation: 212
Reboot/Shutdown the device (nice for copy protection)
« on: November 03, 2013, 10:20:14 pm »
Symbian provides an easy class to shutdown or reboot the device, you can implement this e.g. into a copy protection :P

1. link against StarterClient.lib in your .mmp and add PowerMgmt cap:
Code: [Select]
LIBRARY StarterClient.lib
CAPABILITY PowerMgmt

for Qt users add
Code: [Select]
LIBS += -lStarterClient
TARGET.CAPABILITY += PowerMgmt
into your .pro

2. in your class include the related header:
Code: [Select]
#include <starterclient.h>
3.
a) the method to reboot:
   
Code: [Select]
    RStarterSession starter;
    User::LeaveIfError(starter.Connect());
    starter.Reset(starter.ELanguageSwitchReset);
    starter.Close();

b) the method to shutdown:
Code: [Select]
    RStarterSession starter;
    User::LeaveIfError(starter.Connect());
    starter.Shutdown();
    starter.Close();

really simple.
It looks wrong because there's no CleanupStack but for me it doesn't work with CleanupStack.

Thanks CODeRUS for hinting me the class name :)
Source: http://www.symlab.org/main/documentation/reference/s3/pdk/GUID-A8449386-F424-3357-940C-149250890AD8.html

Offline symster

  • Developer
  • Happy Member
  • ****
  • Posts: 214
  • Reputation: 6
  • Symbian Power User
  • Current Phone: : Nokia N8 Soon Nokia 808
Re: Reboot/Shutdown the device (nice for copy protection)
« Reply #1 on: November 04, 2013, 09:24:52 pm »
What you mean by "copy protection"?

Offline huellif

  • Developer
  • Christmas Santa
  • ****
  • Posts: 402
  • Reputation: 212
Re: Reboot/Shutdown the device (nice for copy protection)
« Reply #2 on: November 04, 2013, 10:03:33 pm »
protecting from warez

Offline symster

  • Developer
  • Happy Member
  • ****
  • Posts: 214
  • Reputation: 6
  • Symbian Power User
  • Current Phone: : Nokia N8 Soon Nokia 808
Re: Reboot/Shutdown the device (nice for copy protection)
« Reply #3 on: November 05, 2013, 09:56:43 am »
How can  i use it for protection?.I don't get it.This just shutdown or reboot so how can it protect from warez.

Offline huellif

  • Developer
  • Christmas Santa
  • ****
  • Posts: 402
  • Reputation: 212
Re: Reboot/Shutdown the device (nice for copy protection)
« Reply #4 on: November 05, 2013, 09:18:53 pm »
you can include a reboot in your copy protection system to annoy crackers/retailers

Offline symster

  • Developer
  • Happy Member
  • ****
  • Posts: 214
  • Reputation: 6
  • Symbian Power User
  • Current Phone: : Nokia N8 Soon Nokia 808
Re: Reboot/Shutdown the device (nice for copy protection)
« Reply #5 on: November 05, 2013, 09:51:16 pm »
??????Don't get you.It doesn't check if the copy is legal or pirated and even if I use it,it will also affect legal copy.Symbian currently don't have any method to check if the copy is legal or not.

Offline Allstar12345

  • Allstar Software Founder
  • Administrator
  • Forum Genius
  • ******
  • Posts: 5,235
  • Reputation: 812
    • Allstar Software
  • Current Phone: : OnePlus 8 Pro, Xperia 10, Nexus 6p, Jolla Phone, Nokia N8, Nokia 808 PureView, BlackBerry Z30
Re: Reboot/Shutdown the device (nice for copy protection)
« Reply #6 on: November 05, 2013, 11:40:16 pm »
It has plenty of methods to check.

Offline huellif

  • Developer
  • Christmas Santa
  • ****
  • Posts: 402
  • Reputation: 212
Re: Reboot/Shutdown the device (nice for copy protection)
« Reply #7 on: November 07, 2013, 12:54:15 am »
??????Don't get you.It doesn't check if the copy is legal or pirated and even if I use it,it will also affect legal copy.Symbian currently don't have any method to check if the copy is legal or not.

did I write you can use this as an copy protection ???
You can inlude this code into your own protection to annoy retailers/crackers, nothing else.

Offline Allstar12345

  • Allstar Software Founder
  • Administrator
  • Forum Genius
  • ******
  • Posts: 5,235
  • Reputation: 812
    • Allstar Software
  • Current Phone: : OnePlus 8 Pro, Xperia 10, Nexus 6p, Jolla Phone, Nokia N8, Nokia 808 PureView, BlackBerry Z30
Re: Reboot/Shutdown the device (nice for copy protection)
« Reply #8 on: November 07, 2013, 12:57:27 am »
I'll probably use this if anyone can tell me the header and lib for CAppUi.

Any ideas which it could be Fabian?

Offline symster

  • Developer
  • Happy Member
  • ****
  • Posts: 214
  • Reputation: 6
  • Symbian Power User
  • Current Phone: : Nokia N8 Soon Nokia 808
Re: Reboot/Shutdown the device (nice for copy protection)
« Reply #9 on: November 08, 2013, 06:39:00 pm »
CAppUi for what?Why you don't write it yourself.

Offline Allstar12345

  • Allstar Software Founder
  • Administrator
  • Forum Genius
  • ******
  • Posts: 5,235
  • Reputation: 812
    • Allstar Software
  • Current Phone: : OnePlus 8 Pro, Xperia 10, Nexus 6p, Jolla Phone, Nokia N8, Nokia 808 PureView, BlackBerry Z30
Re: Reboot/Shutdown the device (nice for copy protection)
« Reply #10 on: November 08, 2013, 07:27:47 pm »
CAppUi for what?Why you don't write it yourself.


It's a Symbian c++ class

Offline symster

  • Developer
  • Happy Member
  • ****
  • Posts: 214
  • Reputation: 6
  • Symbian Power User
  • Current Phone: : Nokia N8 Soon Nokia 808
Re: Reboot/Shutdown the device (nice for copy protection)
« Reply #11 on: November 08, 2013, 10:22:46 pm »
CAknAppUi i see before.Are you sure you are not confused CAknAppUi with CAppUi.Never see such header file before.Like I say you could write your own if know symbia c++ well.

Offline Allstar12345

  • Allstar Software Founder
  • Administrator
  • Forum Genius
  • ******
  • Posts: 5,235
  • Reputation: 812
    • Allstar Software
  • Current Phone: : OnePlus 8 Pro, Xperia 10, Nexus 6p, Jolla Phone, Nokia N8, Nokia 808 PureView, BlackBerry Z30
Re: Reboot/Shutdown the device (nice for copy protection)
« Reply #12 on: November 08, 2013, 10:32:28 pm »
Nope, I'm sure, but I don't know c++ very well

Offline huellif

  • Developer
  • Christmas Santa
  • ****
  • Posts: 402
  • Reputation: 212
Re: Reboot/Shutdown the device (nice for copy protection)
« Reply #13 on: November 09, 2013, 01:12:24 pm »
read here: http://www.symlab.org/main/documentation/reference/s3/pdk/GUID-77329067-34D9-3698-B764-294535E660EB.html

I would include:
avkon.h
avkon.hrh
aknappui.h
eikenv.h
eikappui.h
aknenv.h

and link against lavkon leikcore lcone
« Last Edit: November 09, 2013, 01:15:18 pm by huellif »

Offline symster

  • Developer
  • Happy Member
  • ****
  • Posts: 214
  • Reputation: 6
  • Symbian Power User
  • Current Phone: : Nokia N8 Soon Nokia 808
Re: Reboot/Shutdown the device (nice for copy protection)
« Reply #14 on: November 09, 2013, 06:31:58 pm »
Nope, I'm sure, but I don't know c++ very well

Why you want the header files.What function does the header provide that you need it specifically